:root {
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --heading-color: #ffffff;
    --glass-bg: rgba(22, 27, 34, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-color: #58a6ff;
    --accent-hover: #79c0ff;

    --cve-high: #ff7b72;
    --cve-high-bg: rgba(255, 123, 114, 0.1);
    --cve-med: #d2a8ff;
    --cve-med-bg: rgba(210, 168, 255, 0.1);
    --cve-low: #7ee787;
    --cve-low-bg: rgba(126, 231, 135, 0.1);

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-image: radial-gradient(circle at 50% 0%, rgba(20, 25, 35, 1) 0%, rgba(13, 17, 23, 1) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 8px rgba(121, 192, 255, 0.4);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glass Header & Clocks */
.glass-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem 2.5rem;
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.banner-link {
    text-decoration: none !important;
    color: inherit !important;
    transition: var(--transition);
}

.banner-link:hover h1 {
    color: var(--accent-hover);
    text-shadow: 0 0 15px rgba(88, 166, 255, 0.3);
}

.banner-link h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
}

.site-logo {
    height: 160px;
    width: auto;
    display: block;
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 10px rgba(88, 166, 255, 0.3));
    transition: var(--transition);
}

.banner-link:hover .site-logo {
    filter: drop-shadow(0 0 18px rgba(121, 192, 255, 0.6));
}

/* Search Tab Specific Layouts */
.search-tab-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 3rem 0;
}

.search-tool-block {
    text-align: center;
    width: 100%;
    max-width: 600px;
}

.search-tool-block h2 {
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.banner-link {
    text-decoration: none !important;
    color: inherit !important;
    transition: var(--transition);
}

.banner-link:hover h1 {
    color: var(--accent-hover);
    text-shadow: 0 0 15px rgba(88, 166, 255, 0.3);
}

.banner-link h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
}

.modern-search-wrapper,
.modern-ioc-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.modern-search-wrapper svg,
.modern-ioc-wrapper svg {
    position: absolute;
    left: 20px;
    color: #8b949e;
    pointer-events: none;
    transition: var(--transition);
    width: 22px;
    height: 22px;
}

.modern-input {
    width: 100%;
    padding: 1.2rem 1.2rem 1.2rem 3.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    color: var(--text-color);
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.modern-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(88, 166, 255, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.modern-search-wrapper:focus-within svg,
.modern-ioc-wrapper:focus-within svg {
    color: var(--accent-color);
}

.pivot-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.pivot-btn:hover {
    box-shadow: 0 0 15px rgba(88, 166, 255, 0.5);
    background: var(--accent-hover);
}

.glass-header h1 {
    margin: 0;
    color: var(--heading-color);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.worldClocks {
    display: flex;
    justify-content: center;
    gap: 1.8rem;
    align-items: center;
}

/* Radar-style SVG clock */
.clock-card {
    position: relative;
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: var(--transition);
}

.clock-card::before {
    content: '';
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.clock-card:hover {
    transform: translateY(-3px);
}

.clock-card:hover .clock-ring {
    filter: drop-shadow(0 0 10px rgba(88, 166, 255, 0.45));
}

.clock-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    transition: filter 0.3s ease;
}

.ring-track-outer {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 2;
}

.ring-track-inner {
    fill: none;
    stroke: rgba(255, 255, 255, 0.04);
    stroke-width: 2;
}

.ring-min {
    fill: none;
    stroke: rgba(88, 166, 255, 0.22);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 0 251.3;
}

.ring-sec {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 0 201.1;
    filter: drop-shadow(0 0 3px rgba(88, 166, 255, 0.6));
}

.ring-ref-dot {
    fill: rgba(255, 255, 255, 0.18);
}

.clock-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
    pointer-events: none;
}

.clock-city {
    font-size: 0.57rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6e7681;
    font-weight: 600;
    line-height: 1.4;
}

.clock-hhmm {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--heading-color);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.clock-sec {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.62rem;
    color: var(--accent-color);
    font-weight: 500;
    line-height: 1.2;
    transition: color 0.3s;
}

/* Tabs */
.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    margin-top: 1.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.button {
    background: transparent;
    color: var(--text-color);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.button:hover {
    color: var(--heading-color);
    background: rgba(255, 255, 255, 0.05);
}

.button.active {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 15px rgba(88, 166, 255, 0.4);
}

/* Source Sections */
.source {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--heading-color);
    display: inline-block;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px;
}

/* Ransomware Table */
.ransom-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.ransom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.ransom-table thead {
    background: rgba(88, 166, 255, 0.1);
    position: sticky;
    top: 0;
}

.ransom-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8b949e;
    border-bottom: 1px solid var(--glass-border);
}

.ransom-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition);
}

.ransom-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.ransom-row td {
    padding: 0.9rem 1.5rem;
    vertical-align: middle;
}

.ransom-victim {
    font-weight: 600;
    color: var(--heading-color);
    max-width: 600px;
}

.ransom-date {
    color: #8b949e;
    font-size: 0.85rem;
    white-space: nowrap;
}

.ransom-industry,
.ransom-country {
    color: #8b949e;
    font-size: 0.85rem;
}

.ransom-website {
    font-size: 0.75rem;
    color: #555e6b;
    margin-top: 2px;
}

.ransom-victim-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ransom-victim-title {
    font-weight: 600;
    color: var(--heading-color);
}

.row-critical {
    border-left: 3px solid #f85149;
    background: rgba(248, 81, 73, 0.03);
}

.row-new {
    background: rgba(88, 166, 255, 0.03);
}

.ransom-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.badge.apt {
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #ff8080;
    padding: 0.2rem 0.7rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* ── News article date badge ─────────────────────────── */
.news-item-date {
    display: inline-block;
    font-size: 0.68rem;
    color: #8b949e;
    background: rgba(139, 148, 158, 0.1);
    border-radius: 4px;
    padding: 1px 5px;
    margin-right: 0.45rem;
    white-space: nowrap;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ── Latest Feed list ────────────────────────────────── */
.news-feed-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
}

.news-feed-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.1rem;
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
    transition: background 0.15s;
    flex-wrap: wrap;
}

.news-feed-item:last-child {
    border-bottom: none;
}

.news-feed-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.news-source-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid;
    border-radius: 5px;
    padding: 2px 7px;
    white-space: nowrap;
    flex-shrink: 0;
}

.news-feed-title {
    flex: 1;
    color: #8b949e;
    font-size: 0.9rem;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.2s;
    min-width: 0;
}

.news-feed-title:hover {
    color: #e6edf3;
}

.news-feed-date {
    font-size: 0.72rem;
    color: #8b949e;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}



.news-list {
    display: none; /* Replaced by news-list-premium */
}



/* CVE vulnerabilities grid */
.cve-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
}

.cve-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 600px;
}

.col-header {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.cve-column.high .col-header {
    background: var(--cve-high-bg);
    color: var(--cve-high);
    border: 1px solid rgba(255, 123, 114, 0.3);
}

.cve-column.medium .col-header {
    background: var(--cve-med-bg);
    color: var(--cve-med);
    border: 1px solid rgba(210, 168, 255, 0.3);
}

.cve-column.low .col-header {
    background: var(--cve-low-bg);
    color: var(--cve-low);
    border: 1px solid rgba(126, 231, 135, 0.3);
}

.cve-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    min-height: 500px;
}




/* --- Universal Premium Card System --- */
.premium-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
    animation: fadeInSlideUp 0.4s ease forwards;
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(88, 166, 255, 0.4);
}




.premium-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.premium-card-title {
    margin: 0 0 0.65rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: #e6edf3;
}

.premium-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.premium-card-title a:hover {
    color: var(--accent-color);
}

.premium-card-snippet {
    color: #c9d1d9;
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.premium-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(48, 54, 61, 0.6);
}

.premium-card-meta {
    font-size: 0.8rem;
    color: #8b949e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 2px 8px;
    white-space: nowrap;
}

.premium-badge-default {
    background: rgba(139, 148, 158, 0.12);
    color: #8b949e;
    border: 1px solid rgba(139, 148, 158, 0.2);
}

.premium-badge-accent {
    background: rgba(88, 166, 255, 0.12);
    color: #58a6ff;
    border: 1px solid rgba(88, 166, 255, 0.3);
}

/* --- Ransomware Grid & Compact Cards --- */
.ransom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.compact-card {
    min-height: 160px !important;
    max-height: 220px !important;
    padding: 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
    overflow: hidden !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(48, 54, 61, 0.8) !important;
}

.compact-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(88, 166, 255, 0.4) !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4) !important;
}

.compact-card .premium-card-title {
    font-size: 1.1rem !important;
    margin: 0.2rem 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-card .premium-card-snippet {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    color: #8b949e !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* --- Specific Vulnerability Card Overrides --- */
.cve-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    min-height: 200px !important;
    max-height: none !important;
    flex-shrink: 0 !important;
    height: auto !important;
    overflow: visible !important;
}

.cve-card .premium-card-title,
.cve-card .premium-card-meta,
.cve-card .premium-card-snippet {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.cve-card .premium-card-snippet {
    flex-shrink: 0 !important;
    overflow: visible !important;
    color: #c9d1d9 !important;
}

.cve-card h4 {
    margin: 0;
}

/* --- Scrollable CVE Lists --- */
.cve-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
    margin-right: -5px; /* Offset for scrollbar gap */
    scrollbar-width: thin;
    scrollbar-color: rgba(88, 166, 255, 0.2) transparent;
}

/* Premium Scrollbar for CVE Lists */
.cve-list::-webkit-scrollbar {
    width: 6px;
}
.cve-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}
.cve-list::-webkit-scrollbar-thumb {
    background: rgba(88, 166, 255, 0.2);
    border-radius: 10px;
    transition: background 0.2s;
}
.cve-list::-webkit-scrollbar-thumb:hover {
    background: rgba(88, 166, 255, 0.4);
}


.cve-card h4 a {
    color: var(--heading-color);
    word-wrap: break-word;
    word-break: break-word;
}

.cve-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    color: #8b949e;
}

.premium-badge.score {
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.score-high, .score-critical {
    background: linear-gradient(135deg, #ff7b72 0%, #da3633 100%) !important;
    border: 1px solid rgba(255, 123, 114, 0.4) !important;
    box-shadow: 0 0 12px rgba(255, 123, 114, 0.2);
}

.score-med {
    background: linear-gradient(135deg, #d2a8ff 0%, #a371f7 100%) !important;
    border: 1px solid rgba(210, 168, 255, 0.4) !important;
    box-shadow: 0 0 12px rgba(210, 168, 255, 0.2);
}

.score-low {
    background: linear-gradient(135deg, #7ee787 0%, #238636 100%) !important;
    border: 1px solid rgba(126, 231, 135, 0.4) !important;
    box-shadow: 0 0 12px rgba(126, 231, 135, 0.2);
}

.cve-column.high .premium-badge.score {
    background: linear-gradient(135deg, #ff7b72 0%, #da3633 100%);
}

.cve-column.medium .premium-badge.score {
    background: linear-gradient(135deg, #d2a8ff 0%, #a371f7 100%);
}

.cve-column.low .premium-badge.score {
    background: linear-gradient(135deg, #7ee787 0%, #238636 100%);
}

.cve-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #8b949e;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 1024px) {
    .glass-header {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .worldClocks {
        width: 100%;
        justify-content: space-between;
    }

    .cve-grid {
        grid-template-columns: 1fr;
    }

    .cve-list {
        max-height: none;
    }
}

@media (max-width: 600px) {
    .worldClocks {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .clock-card {
        flex: 1 1 calc(50% - 1rem);
    }

    .tab-buttons {
        flex-direction: column;
        width: 100%;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* --- New Feature Styles --- */

.sticky-watchlist-container {
    position: sticky;
    top: 15px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    pointer-events: none; /* Allow clicks to pass through transparent areas */
}

.sticky-watchlist-container .modern-input {
    width: 600px;
    max-width: 90vw;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(88, 166, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    padding: 0.8rem 1.5rem;
    font-size: 1.05rem;
    transition: var(--transition);
    pointer-events: auto; /* Re-enable pointer events for the input */
}

.sticky-watchlist-container .modern-input:focus {
    border-color: #58a6ff;
    box-shadow: 0 0 15px rgba(88, 166, 255, 0.4);
}

/* Watchlist Match Highlighting */
.watchlist-match {
    position: relative;
    border: 2px solid var(--accent-color) !important;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.3) !important;
    background: rgba(88, 166, 255, 0.07) !important;
    animation: pulseMatch 2s infinite;
}

@keyframes pulseMatch {
    0% { box-shadow: 0 0 10px rgba(88, 166, 255, 0.2); }
    50% { box-shadow: 0 0 25px rgba(88, 166, 255, 0.4); }
    100% { box-shadow: 0 0 10px rgba(88, 166, 255, 0.2); }
}

/* Watchlist Floating Badge */
.watchlist-floating-badge {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-color);
    box-shadow: 0 4px 25px rgba(88, 166, 255, 0.3);
    color: #c9d1d9;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 2000;
    animation: slideInUp 0.3s ease-out forwards;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

/* APT Nation Color Coding */
.apt-row { 
    border-left: 4px solid #30363d; 
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.apt-row:hover { transform: translateY(-3px); }
.apt-row.country-russia { border-left-color: #ff4d4d; }
.apt-row.country-russia:hover { box-shadow: -4px 0 20px rgba(255, 77, 77, 0.25), 0 8px 30px rgba(0,0,0,0.4); }
.apt-row.country-china  { border-left-color: #ffd700; }
.apt-row.country-china:hover  { box-shadow: -4px 0 20px rgba(255, 215, 0, 0.25), 0 8px 30px rgba(0,0,0,0.4); }
.apt-row.country-iran   { border-left-color: #3fb950; }
.apt-row.country-iran:hover   { box-shadow: -4px 0 20px rgba(63, 185, 80, 0.25), 0 8px 30px rgba(0,0,0,0.4); }
.apt-row.country-nk     { border-left-color: #a371f7; }
.apt-row.country-nk:hover     { box-shadow: -4px 0 20px rgba(163, 113, 247, 0.25), 0 8px 30px rgba(0,0,0,0.4); }
.apt-row.country-us     { border-left-color: #58a6ff; }
.apt-row.country-us:hover     { box-shadow: -4px 0 20px rgba(88, 166, 255, 0.25), 0 8px 30px rgba(0,0,0,0.4); }

/* --- APT Card Component System --- */
.apt-card-campaign {
    border-left: 4px solid #ff7b72;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}
.apt-card-campaign:hover {
    transform: translateY(-3px);
    box-shadow: -4px 0 20px rgba(255, 123, 114, 0.2), 0 8px 30px rgba(0,0,0,0.4);
}

.apt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.apt-card-title {
    margin: 0 0 0.6rem 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: #e6edf3;
}

.apt-card-snippet {
    color: #8b949e;
    font-size: 0.83rem;
    line-height: 1.55;
    margin: 0 0 0.85rem 0;
    flex-grow: 1;
}

.apt-card-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(48, 54, 61, 0.6);
}

.apt-meta-author {
    color: #6e7681;
    font-size: 0.78rem;
    font-style: italic;
}

/* Tag Pills */
.apt-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.apt-tag-pill {
    background: rgba(139, 148, 158, 0.12);
    color: #8b949e;
    border: 1px solid rgba(139, 148, 158, 0.2);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Source/OTX Badge */
.apt-source-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ff7b72;
    background: rgba(255, 123, 114, 0.1);
    border: 1px solid rgba(255, 123, 114, 0.3);
    border-radius: 4px;
    padding: 2px 7px;
}

.apt-card-date {
    color: #6e7681;
    font-size: 0.78rem;
}

/* Nation Label */
.apt-nation-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 2px 8px;
    background: rgba(48, 54, 61, 0.6);
    color: #8b949e;
    border: 1px solid #30363d;
}
.apt-nation-label.country-russia-label { color: #ff4d4d; background: rgba(255, 77, 77, 0.1); border-color: rgba(255, 77, 77, 0.3); }
.apt-nation-label.country-china-label  { color: #ffd700; background: rgba(255, 215, 0, 0.1); border-color: rgba(255, 215, 0, 0.3); }
.apt-nation-label.country-iran-label   { color: #3fb950; background: rgba(63, 185, 80, 0.1); border-color: rgba(63, 185, 80, 0.3); }
.apt-nation-label.country-nk-label     { color: #a371f7; background: rgba(163, 113, 247, 0.1); border-color: rgba(163, 113, 247, 0.3); }
.apt-nation-label.country-us-label     { color: #58a6ff; background: rgba(88, 166, 255, 0.1); border-color: rgba(88, 166, 255, 0.3); }

/* Active / Dormant Status */
.apt-active-indicator {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #3fb950;
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.35);
    border-radius: 4px;
    padding: 2px 7px;
    animation: pulseGreen 2.5s ease infinite;
}
.apt-dormant-indicator {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #484f58;
    background: rgba(72, 79, 88, 0.1);
    border: 1px solid rgba(72, 79, 88, 0.3);
    border-radius: 4px;
    padding: 2px 7px;
}
@keyframes pulseGreen {
    0%, 100% { box-shadow: 0 0 4px rgba(63, 185, 80, 0.3); }
    50% { box-shadow: 0 0 10px rgba(63, 185, 80, 0.6); }
}

/* Alias / Target Pill Groups */
.apt-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
    margin-top: 0.75rem;
}
.apt-pill-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #484f58;
    margin-right: 2px;
    white-space: nowrap;
}
.apt-alias-pill {
    background: rgba(48, 54, 61, 0.7);
    color: #8b949e;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.72rem;
}
.apt-target-pill {
    background: rgba(88, 166, 255, 0.08);
    color: #79c0ff;
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.72rem;
}

/* Campaign Observed Button */
.apt-observed-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(63, 185, 80, 0.1);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.35);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.apt-observed-btn::before {
    content: '●';
    font-size: 0.6rem;
    animation: pulseGreen 2s ease infinite;
}
.apt-observed-btn:hover {
    background: rgba(63, 185, 80, 0.18);
    box-shadow: 0 0 12px rgba(63, 185, 80, 0.3);
}

/* --- APT Summary Banner --- */
.apt-summary-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.9), rgba(13, 17, 23, 0.95));
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 1.25rem 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.apt-stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0 2rem;
    text-align: center;
}
.apt-stat-num {
    font-size: 1.9rem;
    font-weight: 800;
    color: #e6edf3;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.apt-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #6e7681;
}
.apt-stat-divider {
    width: 1px;
    height: 40px;
    background: #30363d;
    flex-shrink: 0;
}

/* --- MITRE ATT&CK Pills --- */
.apt-mitre-pill {
    background: rgba(210, 153, 34, 0.1);
    color: #d29922;
    border: 1px solid rgba(210, 153, 34, 0.3);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s;
    letter-spacing: 0.3px;
}
.apt-mitre-pill:hover {
    background: rgba(210, 153, 34, 0.2);
    box-shadow: 0 0 8px rgba(210, 153, 34, 0.3);
    color: #e3b341;
}

/* --- Campaign Severity Badge --- */
.apt-severity-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}
.apt-severity-critical {
    color: #ff7b72;
    background: rgba(255, 123, 114, 0.12);
    border: 1px solid rgba(255, 123, 114, 0.45);
    box-shadow: 0 0 6px rgba(255, 123, 114, 0.2);
    animation: pulseCritical 2.5s ease infinite;
}
.apt-severity-high {
    color: #ffa657;
    background: rgba(255, 166, 87, 0.12);
    border: 1px solid rgba(255, 166, 87, 0.4);
}
.apt-severity-medium {
    color: #d2a8ff;
    background: rgba(210, 168, 255, 0.1);
    border: 1px solid rgba(210, 168, 255, 0.3);
}
.apt-severity-low {
    color: #8b949e;
    background: rgba(139, 148, 158, 0.08);
    border: 1px solid rgba(139, 148, 158, 0.2);
}
@keyframes pulseCritical {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 123, 114, 0.2); }
    50% { box-shadow: 0 0 10px rgba(255, 123, 114, 0.5); }
}

/* --- IOC Indicator Count Chip --- */
.apt-ioc-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(88, 166, 255, 0.08);
    color: #79c0ff;
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.apt-ioc-chip-dot {
    width: 5px;
    height: 5px;
    background: #58a6ff;
    border-radius: 50%;
    flex-shrink: 0;
}

/* --- Malware Family Tag --- */
.apt-malware-tag {
    background: rgba(163, 113, 247, 0.1);
    color: #b87fff;
    border: 1px solid rgba(163, 113, 247, 0.3);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* --- Campaign Age / Recency Strip --- */
.apt-recency-strip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(48, 54, 61, 0.5);
}
.apt-recency-label {
    font-size: 0.68rem;
    color: #484f58;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.apt-recency-bar-track {
    flex: 1;
    height: 4px;
    background: rgba(48, 54, 61, 0.7);
    border-radius: 2px;
    overflow: hidden;
    min-width: 40px;
}
.apt-recency-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}
.apt-recency-fresh  .apt-recency-bar-fill { background: #3fb950; }
.apt-recency-recent .apt-recency-bar-fill { background: #58a6ff; }
.apt-recency-aging  .apt-recency-bar-fill { background: #ffa657; }
.apt-recency-old    .apt-recency-bar-fill { background: #484f58; }
.apt-recency-age-text {
    font-size: 0.7rem;
    color: #6e7681;
    white-space: nowrap;
    flex-shrink: 0;
}

mark.watchlist-text-highlight {
    background: rgba(88, 166, 255, 0.3);
    color: #e6edf3;
    padding: 0 2px;
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(88, 166, 255, 0.5);
    transition: background 0.3s, transform 0.2s;
}

mark.active-mark {
    background: var(--accent-color);
    color: #0d1117;
    font-weight: bold;
    box-shadow: 0 0 15px var(--accent-color);
    transform: scale(1.1);
    display: inline-block;
}

.apt-meta-author {
    font-size: 0.85rem;
    color: #8b949e;
    font-style: italic;
}

/* Modal Export Buttons */
.export-btn-modal {
    background: transparent;
    color: #58a6ff;
    border: 1px solid rgba(88, 166, 255, 0.3);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.export-btn-modal:hover {
    background: rgba(88, 166, 255, 0.1);
    border-color: #58a6ff;
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.2);
}

.export-btn-defanged {
    color: #ffa657;
    border-color: rgba(255, 166, 87, 0.3);
}

.export-btn-defanged:hover {
    background: rgba(255, 166, 87, 0.1);
    border-color: #ffa657;
    box-shadow: 0 0 10px rgba(255, 166, 87, 0.2);
}

/* Animations */
@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.apt-card-campaign {
    animation: fadeInSlideUp 0.4s ease forwards;
}

.watchlist-floating-badge:hover {
    transform: scale(1.02);
    background: rgba(13, 17, 23, 1);
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.watchlist-floating-badge .pulse-dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Intel Modal System --- */
.intel-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideInUp 0.15s ease-out forwards;
}

.intel-modal-content {
    background: #161b22;
    border: 1px solid #30363d;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    width: 800px;
    max-width: 90vw;
    padding: 2.5rem;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.intel-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: #8b949e;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.intel-modal-close:hover {
    color: #ff7b72;
}

/* IOC Clickable Highlights */
.ioc-clickable {
    cursor: pointer;
    border-bottom: 1px dashed var(--accent-color);
    padding: 0 2px;
    border-radius: 2px;
    transition: var(--transition);
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
}

.ioc-clickable:hover {
    background: rgba(88, 166, 255, 0.2);
    border-bottom-style: solid;
    color: var(--accent-hover);
}

.ip-ioc {
    border-bottom-color: #ffca28;
}

.domain-ioc {
    border-bottom-color: #42a5f5;
}

.hash-ioc {
    border-bottom-color: #66bb6a;
}

.cve-ioc {
    border-bottom-color: #ef5350;
}

/* Chart Container Styles */
.chart-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    margin-bottom: 2rem;
}

.kev-badge-inline {
    background: #ff7b72;
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
}

/* Subtabs & KEV Catalog */
.cve-subtabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}
.subtab-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}
.subtab-btn.active, .subtab-btn:hover {
    background: rgba(88, 166, 255, 0.2);
    border-color: var(--accent-color);
    color: #fff;
}
.news-list-premium {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    flex-grow: 1;
}

.news-list-premium li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(48, 54, 61, 0.4);
    font-size: 0.88rem;
    line-height: 1.4;
}

.news-list-premium li:last-child {
    border-bottom: none;
}

.news-list-premium li a {
    color: #8b949e;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
}

.news-list-premium li a:hover {
    color: #e6edf3;
}

.kev-card {
    background: var(--glass-bg);
    border: 1px solid rgba(255, 123, 114, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border-top: 3px solid var(--cve-high);
    transition: transform 0.2s, box-shadow 0.2s;
}
.kev-card h4 {
    color: var(--cve-high);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.kev-meta {
    font-size: 0.85rem;
    color: #8b949e;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.kev-action {
    background: rgba(255, 123, 114, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    border-left: 2px solid var(--cve-high);
}
.kev-ransom {
    display: inline-block;
    background: rgba(210, 168, 255, 0.2);
    color: #d2a8ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    font-weight: bold;
}

/* Generic CVSS Severity Classes */
.score-high {
    background: var(--cve-high) !important;
    color: #000 !important;
}
.score-med {
    background: var(--cve-med) !important;
    color: #000 !important;
}
.score-low {
    background: var(--cve-low) !important;
    color: #000 !important;
}

/* KEV Sort Dropdown */
.kev-sort-select {
    background: rgba(255, 255, 255, 0.06);
    color: #c9d1d9;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%238b949e' d='M6 8L1 3h10z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.2rem;
}
.kev-sort-select:hover {
    border-color: #58a6ff;
    background-color: rgba(88, 166, 255, 0.08);
}
.kev-sort-select option {
    background: #161b22;
    color: #c9d1d9;
}

/* ── Ransomware Banner ─────────────────────────────── */
.ransom-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}
.ransom-stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 140px;
    text-align: center;
    flex: 1;
    max-width: 220px;
}
.ransom-stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: #58a6ff;
    line-height: 1;
}
.ransom-stat-label {
    font-size: 0.78rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ransom-delta {
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 0.2rem;
}
.delta-up   { color: #f78166; }
.delta-down { color: #3fb950; }

/* ── Filter Bar ────────────────────────────────────── */
.ransom-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.export-btn {
    background: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
    border: 1px solid #58a6ff;
    border-radius: 8px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.export-btn:hover { background: rgba(88,166,255,0.22); }

/* ── Table row highlights ──────────────────────────── */
.row-critical td { border-left: 3px solid #ff7b72; }
.new-today-badge {
    background: rgba(63,185,80,0.2);
    color: #3fb950;
    border: 1px solid #3fb950;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.4rem;
    white-space: nowrap;
    vertical-align: middle;
}

/* ── Group Intelligence Grid ───────────────────────── */
.group-intel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.group-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: border-color 0.2s, transform 0.15s;
}
.group-card:hover { border-color: #58a6ff; transform: translateY(-2px); }
.group-card.group-active { border-color: rgba(63,185,80,0.4); }
.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}
.group-name {
    font-size: 1rem;
    font-weight: 700;
    color: #c9d1d9;
    margin: 0;
}
.group-card-stats {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.group-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.group-stat-num {
    font-size: 1.2rem;
    font-weight: 800;
    color: #58a6ff;
}
.group-stat-lbl {
    font-size: 0.72rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.group-desc {
    font-size: 0.82rem;
    color: #8b949e;
    line-height: 1.5;
    margin: 0;
}
.group-link {
    font-size: 0.82rem;
    color: #58a6ff;
    text-decoration: none;
    margin-top: auto;
}
.group-link:hover { text-decoration: underline; }

/* ── Sector & Geo Charts ───────────────────────────── */
.geo-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
@media (max-width: 860px) { .geo-charts-grid { grid-template-columns: 1fr; } }
.geo-chart-block {
    background: rgba(255,255,255,0.03);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 1.5rem;
}
.chart-block-title {
    font-size: 1rem;
    font-weight: 700;
    color: #c9d1d9;
    margin: 0 0 1rem;
}

/* Mini progress bar for country table */
.mini-progress-bar {
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    height: 6px;
    width: 120px;
    margin-bottom: 3px;
    display: inline-block;
    vertical-align: middle;
    overflow: hidden;
}
.mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f78166, #ffa657);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ── Activity Trends ───────────────────────────────── */
.trends-summary-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.trend-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 1.25rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 140px;
    flex: 1;
    max-width: 200px;
}
.trend-big-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: #58a6ff;
    line-height: 1;
}
.trend-label {
    font-size: 0.8rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.trend-delta {
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

/* APT Campaign Card Updates */
.apt-card-campaign {
    max-height: none !important;
}

.apt-card-campaign .premium-card-snippet {
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    text-overflow: ellipsis;
}

.apt-card-campaign .premium-card-title {
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: unset !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* APT Encyclopedia Premium Layout */
.apt-card-profile {
    border-radius: 12px;
    padding: 1.5rem !important;
    transition: var(--transition);
    display: flex !important;
    flex-direction: column !important;
    gap: 0.8rem !important;
    min-height: 280px !important;
}

.apt-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.apt-pill-label {
    font-size: 0.7rem;
    color: #8b949e;
    font-weight: 700;
    text-transform: uppercase;
    width: 100%;
    margin-bottom: 2px;
}

.apt-alias-pill, .apt-target-pill, .apt-mitre-pill {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #c9d1d9;
}

.apt-mitre-pill {
    color: #58a6ff;
    border-color: rgba(88, 166, 255, 0.3);
}

.apt-active-indicator {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
}

.apt-dormant-indicator {
    background: rgba(139, 148, 158, 0.1);
    color: #8b949e;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
}

.apt-observed-btn {
    width: 100%;
    padding: 10px;
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.3);
    color: #3fb950;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.apt-observed-btn:hover {
    background: rgba(63, 185, 80, 0.2);
    box-shadow: 0 0 10px rgba(63, 185, 80, 0.2);
}

/* ══════════════════════════════════════════════════════════════
   NEW FEATURES STYLES
   ══════════════════════════════════════════════════════════════ */

/* ── Cache Refresh Indicator ─────────────────────────────────── */
.banner-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: flex-start;
}
.banner-wrapper > a { display: flex; align-items: center; }
.banner-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.refresh-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: #8b949e;
    letter-spacing: 0.03em;
}
.refresh-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.4s;
}
.dot-fresh  { background: #3fb950; box-shadow: 0 0 6px #3fb950; }
.dot-warn   { background: #d29922; box-shadow: 0 0 6px #d29922; }
.dot-stale  { background: #f85149; box-shadow: 0 0 6px #f85149; }
@keyframes flashGreen {
    0%   { box-shadow: 0 0 0 0 rgba(63,185,80,0.8); }
    70%  { box-shadow: 0 0 0 8px rgba(63,185,80,0); }
    100% { box-shadow: 0 0 0 0 rgba(63,185,80,0); }
}
.dot-flash { animation: flashGreen 1.2s ease-out; }

/* ── News tag filter bar ─────────────────────────────────────── */
.news-tag-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}
.tag-filter-label {
    font-size: 0.78rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    margin-right: 0.3rem;
}
.news-tag-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid #30363d;
    border-radius: 20px;
    color: #8b949e;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 0.3rem 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.news-tag-btn:hover { border-color: #58a6ff; color: #58a6ff; }
.news-tag-btn.active { background: rgba(88,166,255,0.15); border-color: #58a6ff; color: #58a6ff; }
.news-tag-clear { color: #f85149 !important; border-color: #f8514944 !important; }
.news-tag-clear:hover { background: rgba(248,81,73,0.1) !important; }

/* ── Inline tag pills on news items ─────────────────────────── */
.news-tag-pill-item {
    display: inline-block;
    font-size: 0.63rem;
    font-weight: 700;
    border: 1px solid;
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 0.35rem;
    vertical-align: middle;
    white-space: nowrap;
}

/* ── Exploit badge ───────────────────────────────────────────── */
.premium-badge.exploit-badge {
    background: rgba(248,81,73,0.18);
    color: #f85149;
    border: 1px solid #f85149;
    animation: pulseCritical 2s infinite;
}

/* ── CERT country flag label ─────────────────────────────────── */
.cert-country-flag {
    font-size: 0.7rem;
    color: #8b949e;
    background: rgba(255,255,255,0.04);
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── IOC Table ───────────────────────────────────────────────── */
.ioc-row { font-size: 0.84rem; }
.ioc-row:hover { background: rgba(255,255,255,0.03); }
.ioc-value-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 320px;
}
.ioc-code {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    color: #79c0ff;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 260px;
    display: inline-block;
}
.ioc-type-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(88,166,255,0.1);
    color: #58a6ff;
    border: 1px solid rgba(88,166,255,0.3);
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}
.ioc-pivot-btn {
    background: rgba(88,166,255,0.08);
    border: 1px solid rgba(88,166,255,0.3);
    border-radius: 4px;
    color: #58a6ff;
    font-size: 0.7rem;
    padding: 2px 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}
.ioc-pivot-btn:hover { background: rgba(88,166,255,0.22); }


/* ── Keyboard shortcut hint bar (shown on ?) ─────────────────── */
.kbd-hint {
    font-size: 0.72rem;
    color: #8b949e;
    background: rgba(255,255,255,0.04);
    border: 1px solid #30363d;
    border-radius: 5px;
    padding: 1px 6px;
    font-family: monospace;
}

/* ══════════════════════════════════════════
   HOME TAB — DAILY INTELLIGENCE BRIEF
══════════════════════════════════════════ */

/* Action Banner */
.home-action-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 123, 114, 0.12);
    border: 1px solid rgba(255, 123, 114, 0.35);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    color: #ffa198;
}
.home-action-icon { font-size: 0.8rem; font-weight: 700; font-family: monospace; flex-shrink: 0; color: #ff7b72; }
.home-action-text { flex: 1; }
.home-action-dismiss {
    background: none; border: none; color: #ffa198;
    cursor: pointer; font-size: 1rem; padding: 0 4px;
    opacity: 0.7; transition: opacity 0.2s;
}
.home-action-dismiss:hover { opacity: 1; }

/* Date bar */
.home-date-bar {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.home-date-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
}
.home-date-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--heading-color);
}

/* KPI Tiles */
.home-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 1100px) { .home-kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .home-kpi-grid { grid-template-columns: 1fr 1fr; } }

.home-kpi-tile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    transition: border-color 0.25s, transform 0.2s;
}
.home-kpi-tile:hover { transform: translateY(-2px); }
.home-kpi-tile.critical { border-left: 3px solid var(--cve-high); }
.home-kpi-tile.kev      { border-left: 3px solid #ffa657; }
.home-kpi-tile.ransom   { border-left: 3px solid #d2a8ff; }
.home-kpi-tile.ioc      { border-left: 3px solid #58a6ff; }
.home-kpi-tile.apt      { border-left: 3px solid #7ee787; }

.home-kpi-icon { display: none; }
.home-kpi-body { display: flex; flex-direction: column; gap: 2px; }
.home-kpi-num {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--heading-color);
}
.home-kpi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(201, 209, 217, 0.65);
}

/* Trend badges */
.home-trend {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 2px;
}
.home-trend.up   { color: #ff7b72; background: rgba(255,123,114,0.12); }
.home-trend.down { color: #7ee787; background: rgba(126,231,135,0.12); }
.home-trend.flat { color: rgba(201,209,217,0.5); background: transparent; }

/* Main 3-column grid: heatmap | threats+context | feed */
.home-main-grid {
    display: grid;
    grid-template-columns: auto 1fr 360px;
    gap: 1rem;
    align-items: start;
}
@media (max-width: 1150px) { .home-main-grid { grid-template-columns: auto 1fr; } }
@media (max-width: 1150px) { .home-main-grid .home-right-col { grid-column: 1 / -1; } }
@media (max-width: 750px)  { .home-main-grid { grid-template-columns: 1fr; } }

.home-left-col, .home-right-col { display: flex; flex-direction: column; gap: 1rem; }

/* Generic panel */
.home-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
}
.home-panel-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--heading-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Threat items */
.home-threat-item {
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid transparent;
}
.home-threat-item:last-child { margin-bottom: 0; }
.home-threat-item.sev-critical {
    background: rgba(255,123,114,0.08);
    border-left-color: var(--cve-high);
}
.home-threat-item.sev-high {
    background: rgba(210,168,255,0.07);
    border-left-color: var(--cve-med);
}
.home-threat-item.sev-medium {
    background: rgba(88,166,255,0.07);
    border-left-color: var(--accent-color);
}
.home-threat-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}
.home-threat-type {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(201,209,217,0.5);
}
.home-threat-score {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--cve-high);
    margin-left: auto;
}
.home-threat-item.sev-high .home-threat-score   { color: var(--cve-med); }
.home-threat-item.sev-medium .home-threat-score { color: var(--accent-color); }
.home-threat-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}
.home-threat-desc {
    font-size: 0.78rem;
    color: rgba(201,209,217,0.7);
    line-height: 1.45;
    margin-bottom: 0.25rem;
}
.home-threat-also {
    font-size: 0.72rem;
    color: rgba(201,209,217,0.5);
}

/* Context row: sector / country / news */
.home-context-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}
@media (max-width: 900px) { .home-context-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .home-context-row { grid-template-columns: 1fr; } }

.home-context-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1rem;
}
.home-context-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(201,209,217,0.45);
    margin-bottom: 0.4rem;
}
.home-context-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 0.6rem;
}
.home-context-val.muted { color: rgba(201,209,217,0.35); font-weight: 400; }

/* Mini bar charts */
.home-mini-bars { display: flex; flex-direction: column; gap: 5px; }
.home-mini-bar-row {
    display: grid;
    grid-template-columns: 90px 1fr 28px;
    align-items: center;
    gap: 6px;
}
.home-mini-bar-label {
    font-size: 0.68rem;
    color: rgba(201,209,217,0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.home-mini-bar-track {
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.home-mini-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}
.ransom-fill  { background: linear-gradient(90deg, #d2a8ff, #a07bd0); }
.country-fill { background: linear-gradient(90deg, #58a6ff, #1f6feb); }
.home-mini-bar-count {
    font-size: 0.65rem;
    color: rgba(201,209,217,0.45);
    text-align: right;
}

/* News quick rows */
.home-news-row {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-bottom: 0.55rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.home-news-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.home-news-source {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-color);
}
.home-news-title {
    font-size: 0.78rem;
    color: rgba(201,209,217,0.85);
    line-height: 1.35;
}
.home-news-title:hover { color: var(--accent-hover); }

/* Live Feed panel */
.home-feed-panel { padding: 1.25rem 1rem; }
.home-feed-subtitle {
    font-size: 0.65rem;
    font-weight: 400;
    color: rgba(201,209,217,0.4);
    margin-left: 4px;
    text-transform: none;
    letter-spacing: 0;
}
.home-feed-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 680px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.home-feed-empty {
    font-size: 0.8rem;
    color: rgba(201,209,217,0.4);
    text-align: center;
    padding: 2rem 1rem;
    line-height: 1.6;
}
.home-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.55rem 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}
.home-feed-item:hover { background: rgba(255,255,255,0.03); border-radius: 6px; }
.home-feed-item:last-child { border-bottom: none; }

/* Feed severity left border via box-shadow trick */
.feed-sev-critical { box-shadow: inset 3px 0 0 var(--cve-high); padding-left: 0.7rem; }
.feed-sev-high     { box-shadow: inset 3px 0 0 var(--cve-med); padding-left: 0.7rem; }
.feed-sev-medium   { box-shadow: inset 3px 0 0 var(--accent-color); padding-left: 0.7rem; }
.feed-sev-info     { box-shadow: inset 3px 0 0 rgba(255,255,255,0.1); padding-left: 0.7rem; }

.home-feed-icon { display: none; }
.home-feed-tag {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: 2px;
    background: rgba(255,255,255,0.07);
    color: rgba(201,209,217,0.55);
    font-family: monospace;
}
.feed-tag-kev      { background: rgba(255,123,114,0.15); color: #ff7b72; }
.feed-tag-cve      { background: rgba(255,123,114,0.10); color: #ffa198; }
.feed-tag-ransomware { background: rgba(210,168,255,0.12); color: #d2a8ff; }
.feed-tag-apt      { background: rgba(126,231,135,0.10); color: #7ee787; }
.feed-tag-news     { background: rgba(88,166,255,0.10);  color: #58a6ff; }
.feed-tag-ioc      { background: rgba(255,166,87,0.10);  color: #ffa657; }
.home-feed-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.home-feed-title {
    font-size: 0.78rem;
    color: rgba(201,209,217,0.85);
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.home-feed-title:hover { color: var(--accent-hover); }
.home-feed-time {
    font-size: 0.62rem;
    color: rgba(201,209,217,0.35);
    font-family: monospace;
}

/* ══════════════════════════════════════════
   TOOLS TAB
══════════════════════════════════════════ */

.tools-subtab {
    padding: 0.5rem 0 2rem;
}

.tools-panel {
    background: rgba(22, 27, 34, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
}

.tools-desc {
    color: #8b949e;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.tools-textarea {
    width: 100%;
    min-height: 140px;
    background: rgba(13, 17, 23, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-color);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tools-textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.tools-textarea[readonly] {
    background: rgba(13, 17, 23, 0.5);
    cursor: default;
}

.tools-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tools-primary-btn {
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 0.55rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.tools-primary-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 12px rgba(88, 166, 255, 0.4);
}

.tools-clear-btn {
    background: rgba(139, 148, 158, 0.08);
    border: 1px solid rgba(139, 148, 158, 0.25);
    border-radius: 8px;
    color: #8b949e;
    font-size: 0.875rem;
    padding: 0.55rem 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tools-clear-btn:hover {
    background: rgba(139, 148, 158, 0.18);
    color: var(--text-color);
}

.tools-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.triage-actions {
    display: flex;
    gap: 0.35rem;
}

/* ── Smart Pivot tiles ── */
.pivot-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.9rem;
    max-width: 900px;
    margin: 0 auto;
}

.pivot-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.1rem;
    background: rgba(22, 27, 34, 0.8);
    border: 1px solid rgba(255,255,255,0.07);
    border-left: 3px solid var(--tile-color, #58a6ff);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none !important;
    transition: all 0.18s ease;
    gap: 0.5rem;
}

.pivot-tile:hover {
    border-color: var(--tile-color, #58a6ff);
    background: rgba(88, 166, 255, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    color: var(--tile-color, #58a6ff) !important;
    text-shadow: none;
}

.pivot-tile-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.pivot-tile-arrow {
    font-size: 1rem;
    opacity: 0.55;
    flex-shrink: 0;
}

/* ── Decode mode selector ── */
.decode-mode-row {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.decode-mode-btn {
    background: rgba(139, 148, 158, 0.07);
    border: 1px solid rgba(139, 148, 158, 0.2);
    border-radius: 6px;
    color: #8b949e;
    font-size: 0.8rem;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
}

.decode-mode-btn:hover {
    background: rgba(88, 166, 255, 0.08);
    border-color: rgba(88, 166, 255, 0.3);
    color: #58a6ff;
}

.decode-mode-btn.active {
    background: rgba(88, 166, 255, 0.14);
    border-color: rgba(88, 166, 255, 0.5);
    color: #58a6ff;
    font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════════
   NEW FEATURES — v3 additions
   ══════════════════════════════════════════════════════════════════ */

/* ── Header Controls (theme + refresh + help) ─────────────────── */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-refresh-btn {
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.35);
    color: #3fb950;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s;
}
.header-refresh-btn:hover  { background: rgba(63, 185, 80, 0.2); }
.header-refresh-btn.loading { opacity: 0.5; cursor: not-allowed; }

.theme-toggle {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    cursor: pointer;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 0.95rem;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-family: 'Inter', sans-serif;
}
.theme-toggle:hover { opacity: 1; }

/* ── Light Mode ───────────────────────────────────────────────── */
body.light-mode {
    --bg-color: #f6f8fa;
    --text-color: #24292f;
    --heading-color: #1f2328;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(0, 0, 0, 0.12);
    --accent-color: #0969da;
    --accent-hover: #0550ae;
    background-image: radial-gradient(circle at 50% 0%, #eef2f7 0%, #f6f8fa 100%);
}
body.light-mode .premium-card,
body.light-mode .news-card    { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.1); }
body.light-mode .ransom-table tbody tr:nth-child(even) { background: rgba(0,0,0,0.03); }
body.light-mode .ransom-table thead th { background: rgba(0,0,0,0.06); }
body.light-mode .kev-sort-select { background: #fff; border-color: rgba(0,0,0,0.2); color: #24292f; }
body.light-mode .ioc-code       { background: rgba(0,0,0,0.06); color: #1f2328; }
body.light-mode .intel-modal-content { background: #fff; border-color: rgba(0,0,0,0.15); }
body.light-mode .notebook-panel       { background: #fff; border-color: rgba(0,0,0,0.12); }
body.light-mode .notebook-textarea    { color: #24292f; }
body.light-mode .ctx-menu             { background: #fff; border-color: rgba(0,0,0,0.15); }
body.light-mode .ctx-menu-item        { color: #24292f; }
body.light-mode .shortcut-modal       { background: #fff; border-color: rgba(0,0,0,0.12); }
body.light-mode .shortcut-row         { color: #24292f; border-color: rgba(0,0,0,0.08); }
body.light-mode .shortcut-key         { background: #f6f8fa; border-color: rgba(0,0,0,0.15); color: #0969da; }
body.light-mode .email-header-section { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1); }
body.light-mode .heatmap-container    { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1); }
body.light-mode .heatmap-cell         { background: #ebedf0; outline-color: rgba(0,0,0,0.06); }
body.light-mode .heatmap-cell[data-level="1"] { background: #9be9a8; }
body.light-mode .heatmap-cell[data-level="2"] { background: #40c463; }
body.light-mode .heatmap-cell[data-level="3"] { background: #30a14e; }
body.light-mode .heatmap-cell[data-level="4"] { background: #216e39; }
body.light-mode .epss-scatter-container { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1); }
body.light-mode .home-kpi-tile        { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.1); }
body.light-mode .home-panel           { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.1); }
body.light-mode code                  { background: rgba(0,0,0,0.06); color: #1f2328; }

/* ── Watchlist Match Summary ──────────────────────────────────── */
.watchlist-match-summary {
    text-align: center;
    padding: 0.3rem 0 0;
    font-size: 0.78rem;
    color: #58a6ff;
    display: none;
    letter-spacing: 0.02em;
}

/* ── Keyboard Shortcut Modal ──────────────────────────────────── */
.shortcut-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shortcut-modal {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 1.75rem 2rem;
    min-width: 380px;
    max-width: 520px;
    width: 90vw;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.shortcut-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    color: #c9d1d9;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(48, 54, 61, 0.6);
}
.shortcut-row:last-child { border-bottom: none; }

.shortcut-key {
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 2px 10px;
    font-family: monospace;
    font-size: 0.82rem;
    color: #58a6ff;
    min-width: 32px;
    text-align: center;
}

/* ── Investigation Notebook ───────────────────────────────────── */
.notebook-toggle-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 1000;
    background: rgba(88, 166, 255, 0.12);
    border: 1px solid rgba(88, 166, 255, 0.35);
    color: #58a6ff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}
.notebook-toggle-btn:hover  { background: rgba(88, 166, 255, 0.22); transform: scale(1.06); }
.notebook-toggle-btn.flash  { background: rgba(63, 185, 80, 0.3); border-color: #3fb950; color: #3fb950; }

.notebook-panel {
    position: fixed;
    bottom: 92px;
    right: 28px;
    width: 360px;
    max-height: 500px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    z-index: 999;
    display: none;
    flex-direction: column;
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.55);
}
.notebook-panel.open { display: flex; }

.notebook-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #30363d;
    flex-shrink: 0;
}
.notebook-header-title { font-size: 0.88rem; font-weight: 700; color: #e6edf3; }

.notebook-actions { display: flex; gap: 0.4rem; }

.notebook-act-btn {
    background: none;
    border: 1px solid #30363d;
    color: #8b949e;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.72rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}
.notebook-act-btn:hover { border-color: #58a6ff; color: #58a6ff; }

.notebook-textarea {
    flex: 1;
    background: none;
    border: none;
    color: #c9d1d9;
    font-family: 'Inter', monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    padding: 0.75rem 1rem;
    resize: none;
    outline: none;
    min-height: 260px;
}
.notebook-textarea::placeholder { color: #484f58; }

/* ── Right-click Context Menu ─────────────────────────────────── */
.ctx-menu {
    position: absolute;
    z-index: 9000;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 0.35rem 0;
    min-width: 190px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}
.ctx-menu-item {
    padding: 0.42rem 1rem;
    color: #c9d1d9;
    font-size: 0.84rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.1s;
}
.ctx-menu-item:hover  { background: rgba(88, 166, 255, 0.1); color: #58a6ff; }
.ctx-menu-divider     { height: 1px; background: #30363d; margin: 0.2rem 0; }

/* ── Investigated Row ─────────────────────────────────────────── */
.row-investigated {
    opacity: 0.38 !important;
    filter: grayscale(0.5);
    position: relative;
}
.row-investigated td { text-decoration: line-through; }
.row-investigated .premium-card-title { text-decoration: line-through; }

/* ── Activity Heatmap (GitHub-style, vertical) ────────────────── */
.home-heatmap-col { flex-shrink: 0; }

.heatmap-container {
    --cell-size: 13px;
    padding: 0.75rem 0.9rem 0.75rem;
    background: rgba(22, 27, 34, 0.4);
    border: 1px solid #30363d;
    border-radius: 8px;
    display: inline-flex;
    flex-direction: column;
    gap: 0;
}
.heatmap-title {
    font-size: 0.68rem;
    color: #8b949e;
    margin-bottom: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
}
.heatmap-grid { /* wrapper — layout handled by .gh-heatmap-vert children */ }

/* Vertical GitHub-style grid */
.gh-heatmap-vert {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gh-vert-header {
    display: flex;
    gap: 2px;
    align-items: center;
    margin-bottom: 1px;
}
.gh-vert-corner {
    width: 22px;
    flex-shrink: 0;
}
.gh-vert-daylabel {
    width: var(--cell-size);
    text-align: center;
    font-size: 0.58rem;
    color: #8b949e;
    line-height: 1;
    display: inline-block;
}
.gh-vert-week {
    display: flex;
    gap: 2px;
    align-items: center;
}
.gh-vert-monthlabel {
    width: 22px;
    font-size: 0.58rem;
    color: #8b949e;
    text-align: right;
    padding-right: 3px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: visible;
    line-height: var(--cell-size);
}
.heatmap-cell {
    width: var(--cell-size);
    height: var(--cell-size);
    border-radius: 2px;
    background: #161b22;
    outline: 1px solid rgba(27, 31, 35, 0.06);
    cursor: default;
    transition: transform 0.1s, outline-color 0.1s;
}
.heatmap-cell:hover {
    transform: scale(1.35);
    outline-color: rgba(255,255,255,0.3);
    z-index: 1;
}
.heatmap-cell[data-level="1"] { background: #0e4429; }
.heatmap-cell[data-level="2"] { background: #006d32; }
.heatmap-cell[data-level="3"] { background: #26a641; }
.heatmap-cell[data-level="4"] { background: #39d353; }
.heatmap-legend {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 0.5rem;
    padding-left: 25px; /* align with cell columns */
}
.heatmap-legend-cell {
    width: var(--cell-size);
    height: var(--cell-size);
    border-radius: 2px;
}


/* ── Timestamp Converter ──────────────────────────────────────── */
.ts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.ts-field label {
    display: block;
    font-size: 0.78rem;
    color: #8b949e;
    margin-bottom: 0.35rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ts-field input {
    width: 100%;
    background: #21262d;
    border: 1px solid #30363d;
    color: #e6edf3;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: monospace;
    transition: border-color 0.15s;
}
.ts-field input:focus         { outline: none; border-color: #58a6ff; }
.ts-field input[readonly]     { color: #8b949e; cursor: default; }

/* ── Email Header Analyzer ────────────────────────────────────── */
.email-header-results        { margin-top: 1.5rem; display: none; }

.email-header-section {
    background: rgba(22, 27, 34, 0.6);
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.email-header-section h4 {
    color: #8b949e;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.75rem;
    font-weight: 700;
}
.email-header-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
    font-size: 0.84rem;
}
.email-header-row:last-child  { border-bottom: none; }
.email-header-key             { color: #8b949e; min-width: 130px; flex-shrink: 0; }
.email-header-val             { color: #e6edf3; word-break: break-all; }
.auth-pass                    { color: #3fb950; font-weight: 700; }
.auth-fail                    { color: #ff7b72; font-weight: 700; }
.auth-softfail                { color: #d29922; font-weight: 700; }

.hop-item {
    padding: 0.38rem 0;
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
    font-size: 0.82rem;
}
.hop-item:last-child { border-bottom: none; }
.hop-num  { color: #58a6ff; font-weight: 700; display: inline-block; min-width: 2.2rem; }
.hop-ip   { font-family: monospace; color: #ffa657; text-decoration: none; }
.hop-ip:hover { color: #ffcc80; text-decoration: underline; }

