/* ElectriCISO Dashboard Styles */

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2rem;
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.help-center-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 212, 170, 0.15);
    border: 1px solid rgba(0, 212, 170, 0.4);
    color: #00d4aa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.help-center-link:hover {
    background: rgba(0, 212, 170, 0.25);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.2);
    color: #00d4aa;
}

.help-center-link svg {
    flex-shrink: 0;
}

.customize-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: var(--color-text);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.customize-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 2rem;
}

.dashboard-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.dashboard-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Section Headers */
.dashboard-section {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #8b5cf6 0%, #06b6d4 100%);
    border-radius: 2px;
}

/* KPI Card */
.kpi-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.6) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-card.span-2 {
    grid-column: span 2;
}

.kpi-card.span-3 {
    grid-column: span 3;
}

.kpi-card.span-4 {
    grid-column: span 4;
}

.kpi-card.tall {
    min-height: 300px;
}

/* KPI Header */
.kpi-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.kpi-label {
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.kpi-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.kpi-status.good {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.kpi-status.warning {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.kpi-status.critical {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.kpi-status.not-developed {
    background: #64748b;
    box-shadow: 0 0 10px rgba(100, 116, 139, 0.35);
}

.kpi-message {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border-radius: 10px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.35);
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.kpi-message-title {
    font-weight: 600;
    color: var(--color-text);
}

.kpi-message-body {
    color: var(--color-text-muted);
    line-height: 1.4;
}

.kpi-message.not-developed {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.08);
}

.kpi-message.not-developed .kpi-message-title {
    color: #f59e0b;
}

.kpi-message.unavailable {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.08);
}

.kpi-message.unavailable .kpi-message-title {
    color: #fca5a5;
}

.kpi-message.empty .kpi-message-title {
    color: var(--color-text-muted);
}

.kpi-empty {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 8px;
}

/* KPI Value */
.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.kpi-value.large {
    font-size: 3.5rem;
}

.kpi-value.medium {
    font-size: 2rem;
}

.kpi-unit {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* Trend Indicators */
.kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.trend-up {
    color: #10b981;
}

.trend-down {
    color: #ef4444;
}

.trend-stable {
    color: var(--color-text-muted);
}

.kpi-subtitle {
    font-size: 12px;
    color: var(--color-text-dim);
}

/* Chart Container */
.kpi-chart {
    height: 150px;
    margin-top: 16px;
    position: relative;
}

.kpi-chart.large {
    height: 200px;
}

.kpi-chart.small {
    height: 100px;
}

.kpi-chart canvas {
    max-height: 100%;
}

.chart-view-control {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.chart-view-control.chart-view-control--below {
    position: relative;
    top: auto;
    right: auto;
    margin-top: 6px;
}

.chart-view-trigger {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.7);
    color: rgba(226, 232, 240, 0.7);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-view-trigger:hover {
    color: #fff;
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.chart-view-trigger svg {
    width: 14px;
    height: 14px;
}

.chart-view-popover {
    position: absolute;
    top: 32px;
    right: 0;
    min-width: 170px;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 18px 30px rgba(2, 6, 23, 0.5);
    display: none;
}

.chart-view-control.is-open .chart-view-popover {
    display: block;
}

.chart-view-option {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    padding: 6px 8px;
    text-align: left;
    font-size: 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-view-option:hover {
    color: #fff;
    background: rgba(56, 189, 248, 0.18);
}

.chart-view-option.is-active {
    color: #fff;
    background: rgba(56, 189, 248, 0.28);
}

.incidents-chart-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.incidents-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.75rem;
}

.incidents-range {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.range-label {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-dim);
}

.range-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.range-chip {
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.65);
    color: var(--color-text-muted);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.range-chip:hover {
    color: #fff;
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.range-chip.is-active {
    color: #fff;
    border-color: rgba(56, 189, 248, 0.7);
    background: rgba(56, 189, 248, 0.2);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}

.threat-chart-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.threat-range {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* Circular Gauge for Security Score */
.gauge-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.gauge-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.gauge-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* Progress Bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6 0%, #06b6d4 100%);
    border-radius: 999px;
    transition: width 0.6s ease;
}

.progress-fill.good {
    background: linear-gradient(90deg, #10b981 0%, #22c55e 100%);
}

.progress-fill.warning {
    background: linear-gradient(90deg, #f59e0b 0%, #eab308 100%);
}

.progress-fill.critical {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

/* Mini Stats */
.mini-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.mini-stat {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
}

.mini-stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    position: relative;
    top: auto;
    right: auto;
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
    overflow: visible;
}

.badge.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.badge.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}

.kpi-card .badge.danger,
.kpi-card .badge.warning {
    position: relative;
    padding-left: 18px;
    animation: kpiBadgePulse 2.4s ease-in-out infinite;
}

.kpi-card .badge.danger {
    --badge-dot: #ef4444;
    --badge-pulse: rgba(239, 68, 68, 0.55);
}

.kpi-card .badge.warning {
    --badge-dot: #f59e0b;
    --badge-pulse: rgba(245, 158, 11, 0.5);
}

.kpi-card .badge.danger::before,
.kpi-card .badge.warning::before {
    content: '';
    position: absolute;
    left: 6px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--badge-dot);
    box-shadow: 0 0 8px var(--badge-pulse);
    animation: kpiDotPulse 2.4s ease-in-out infinite;
}

@keyframes kpiDotPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
        box-shadow: 0 0 8px var(--badge-pulse);
    }
    50% {
        transform: scale(1.6);
        opacity: 1;
        box-shadow:
            0 0 14px var(--badge-pulse),
            0 0 26px var(--badge-pulse);
    }
}

@keyframes kpiBadgePulse {
    0%,
    100% {
        box-shadow: 0 0 0 rgba(2, 6, 23, 0);
    }
    50% {
        box-shadow: 0 0 16px var(--badge-pulse);
    }
}

@media (prefers-reduced-motion: reduce) {
    .kpi-card .badge.danger,
    .kpi-card .badge.warning,
    .kpi-card .badge.danger::before,
    .kpi-card .badge.warning::before {
        animation: none;
    }
}

.badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

/* List */
.kpi-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
}

.kpi-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.kpi-list-item:last-child {
    border-bottom: none;
}

.kpi-list-item-label {
    color: var(--color-text-muted);
}

.kpi-list-item-value {
    color: var(--color-text);
    font-weight: 600;
}

/* Drilldown clickable sub-elements */
.kpi-card [data-href] {
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    border-radius: 6px;
}

.kpi-card [data-href]:hover {
    background: rgba(139, 92, 246, 0.1);
}

.kpi-list-item[data-href]:hover {
    background: rgba(139, 92, 246, 0.12);
    padding-left: 8px;
}

.badge[data-href]:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

.kpi-chart canvas {
    cursor: pointer;
}

[data-widget-id="incidents-timeline"] .kpi-chart canvas {
    cursor: default;
}

/* Responsive */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kpi-card.span-3,
    .kpi-card.span-4 {
        grid-column: span 2;
    }

    /* Exploitation banner: stack actions below content */
    .exploitation-banner {
        flex-wrap: wrap;
    }

    .exploitation-banner-actions {
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .kpi-card.span-2,
    .kpi-card.span-3,
    .kpi-card.span-4 {
        grid-column: span 1;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .dashboard-header > div {
        width: 100%;
        flex-wrap: wrap;
    }

    .dashboard-title {
        font-size: 1.5rem;
    }

    /* Exploitation banner: fully stacked layout */
    .exploitation-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px;
        gap: 12px;
    }

    .exploitation-banner-icon {
        width: 36px;
        height: 36px;
    }

    .exploitation-banner-icon svg {
        width: 18px;
        height: 18px;
    }

    .exploitation-banner-title {
        font-size: 0.88rem;
    }

    .exploitation-banner-text {
        font-size: 0.82rem;
    }

    .exploitation-banner-actions {
        flex-wrap: wrap;
        width: 100%;
        gap: 6px;
    }

    .exploitation-banner-actions .btn-sm {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    /* KPI cards: tighter padding */
    .kpi-card {
        padding: 16px;
    }

    .kpi-card:hover {
        transform: none;
    }

    /* KPI values: smaller on tablet/mobile */
    .kpi-value {
        font-size: 2rem;
        gap: 8px;
    }

    .kpi-value.large {
        font-size: 2.5rem;
    }

    .kpi-value.medium {
        font-size: 1.75rem;
    }

    /* Gauge: smaller on mobile */
    .gauge-container {
        width: 160px;
        height: 160px;
    }

    .gauge-number {
        font-size: 2.2rem;
    }

    /* Mini stats: wrap if needed */
    .mini-stats {
        flex-wrap: wrap;
        gap: 10px;
    }

    .mini-stat {
        min-width: calc(50% - 10px);
    }

    .mini-stat-value {
        font-size: 1.25rem;
    }

    /* Chart containers */
    .kpi-chart {
        height: 130px;
    }

    .kpi-chart.large {
        height: 170px;
    }

    /* Responder launcher: tighter on mobile */
    .responder-launcher-header {
        padding: 16px 16px 10px;
    }

    .responder-launcher-header h3 {
        font-size: 1.05rem;
    }

    /* Prevent horizontal overflow */
    .dashboard-grid {
        overflow: hidden;
    }

    .kpi-card {
        overflow: hidden;
        min-width: 0;
    }

    /* Force chart canvas to respect container */
    .kpi-chart canvas,
    .widget-content canvas {
        max-width: 100% !important;
    }
}

@media (max-width: 600px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .kpi-card.span-2,
    .kpi-card.span-3,
    .kpi-card.span-4 {
        grid-column: span 1;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 1.25rem;
    }

    .dashboard-header > div {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .customize-btn {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .help-center-link {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .dashboard-title {
        font-size: 1.35rem;
    }

    /* KPI cards: compact padding */
    .kpi-card {
        padding: 14px;
    }

    .kpi-label {
        font-size: 0.75rem;
    }

    /* Gauge: even smaller */
    .gauge-container {
        width: 140px;
        height: 140px;
    }

    .gauge-number {
        font-size: 1.8rem;
    }

    .gauge-label {
        font-size: 0.7rem;
    }

    /* KPI values */
    .kpi-value {
        font-size: 1.75rem;
    }

    .kpi-value.large {
        font-size: 2rem;
    }

    .kpi-value.medium {
        font-size: 1.5rem;
    }

    .kpi-unit {
        font-size: 0.85rem;
    }

    .kpi-trend {
        font-size: 0.8rem;
    }

    .kpi-subtitle {
        font-size: 0.82rem;
    }

    /* Chart containers: compact */
    .kpi-chart {
        height: 120px;
    }

    .kpi-chart.large {
        height: 150px;
    }

    /* List items: compact */
    .kpi-list-item {
        padding: 8px 0;
        font-size: 0.82rem;
    }

    /* Badges: slightly smaller */
    .badge {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    /* Incidents chart footer: stack controls */
    .incidents-chart-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .incidents-legend {
        font-size: 0.7rem;
        gap: 8px;
    }

    .range-chips {
        gap: 4px;
    }

    .range-chip {
        padding: 0.2rem 0.5rem;
        font-size: 0.6rem;
    }

    /* Threat chart footer */
    .threat-chart-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* Chart view controls */
    .chart-view-popover {
        min-width: 140px;
    }

    /* Exploitation CVE items in alerts widget */
    .exploitation-cve-item {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    .exploitation-cve-id {
        font-size: 0.75rem;
    }

    .exploitation-kev-badge {
        font-size: 0.6rem;
        padding: 1px 4px;
    }

    /* Training pulse: smaller */
    .training-pulse-wrapper {
        width: 56px;
        height: 56px;
    }

    .training-pulse-value {
        font-size: 0.85rem;
    }

    .training-pulse-label {
        font-size: 0.5rem;
    }

    /* Tooltip adjustments for mobile */
    .has-tip::before {
        max-width: 240px;
        font-size: 0.72rem;
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        gap: 10px;
    }

    .kpi-card {
        padding: 12px;
        border-radius: 10px;
    }

    .kpi-header {
        margin-bottom: 10px;
    }

    .kpi-label {
        font-size: 0.7rem;
        letter-spacing: 0.3px;
    }

    .dashboard-title {
        font-size: 1.2rem;
    }

    .customize-btn {
        padding: 7px 12px;
        font-size: 0.78rem;
    }

    .help-center-link {
        padding: 7px 12px;
        font-size: 0.78rem;
    }

    /* Gauge: minimal mobile */
    .gauge-container {
        width: 120px;
        height: 120px;
    }

    .gauge-number {
        font-size: 1.5rem;
    }

    /* KPI values: minimal */
    .kpi-value {
        font-size: 1.5rem;
    }

    .kpi-value.large {
        font-size: 1.75rem;
    }

    .kpi-value.medium {
        font-size: 1.35rem;
    }

    /* Mini stats: single column on very small */
    .mini-stats {
        flex-direction: column;
        gap: 8px;
    }

    .mini-stat {
        min-width: 100%;
        padding: 10px;
    }

    .mini-stat-value {
        font-size: 1.1rem;
    }

    .mini-stat-label {
        font-size: 0.7rem;
    }

    /* Exploitation banner: tightest */
    .exploitation-banner {
        padding: 12px;
        gap: 10px;
        border-radius: 10px;
    }

    .exploitation-banner-icon {
        width: 32px;
        height: 32px;
    }

    .exploitation-banner-icon svg {
        width: 16px;
        height: 16px;
    }

    .exploitation-banner-title {
        font-size: 0.82rem;
    }

    .exploitation-banner-text {
        font-size: 0.78rem;
    }

    .exploitation-banner-actions .btn-sm {
        padding: 5px 10px;
        font-size: 0.72rem;
    }

    /* Section titles */
    .section-title {
        font-size: 1.15rem;
        gap: 8px;
    }

    .section-title::before {
        width: 3px;
        height: 18px;
    }

    /* Chart containers: most compact */
    .kpi-chart {
        height: 100px;
        margin-top: 10px;
    }

    .kpi-chart.large {
        height: 130px;
    }

    .kpi-chart.small {
        height: 80px;
    }

    /* List items */
    .kpi-list-item {
        font-size: 0.78rem;
        padding: 7px 0;
    }

    /* Tooltip: prevent spill on very small screens */
    .has-tip::before {
        max-width: 200px;
        left: 0;
        transform: translateX(0) translateY(4px);
    }

    .has-tip:hover::before {
        transform: translateX(0) translateY(0);
    }

    .has-tip::after {
        left: 16px;
    }

    /* Responder launcher: full screen takeover on small mobile */
    .responder-launcher-modal {
        width: 100vw;
        max-width: 100vw;
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
    }

    .responder-launcher-header {
        padding: 12px 14px 8px;
    }

    .responder-launcher-header h3 {
        font-size: 1rem;
    }

    .responder-launcher-header p {
        font-size: 0.78rem;
    }

    .responder-item-title {
        font-size: 0.78rem;
    }

    .responder-item-meta {
        font-size: 0.7rem;
    }

    .responder-severity {
        font-size: 0.65rem;
        padding: 1px 6px;
    }

    .responder-launcher-footer {
        padding: 10px 14px;
    }

    .responder-launcher-selection {
        font-size: 0.78rem;
    }

    .responder-launcher-cancel {
        padding: 6px 12px;
        font-size: 0.78rem;
    }

    .responder-launcher-launch {
        padding: 6px 14px;
        font-size: 0.78rem;
    }
}


/* Loading State */
.kpi-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.kpi-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(139, 92, 246, 0.3);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Empty State */
.kpi-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted);
}

.kpi-empty-icon {
    font-size: 3rem;
    opacity: 0.5;
    margin-bottom: 12px;
}

.kpi-empty-text {
    font-size: 0.9rem;
}

/* Training Pulse Indicator */
.training-pulse-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.training-pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.35), rgba(34, 197, 94, 0));
    animation: training-pulse 2s ease-out infinite;
}

.training-pulse-ring.warning {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.35), rgba(245, 158, 11, 0));
}

.training-pulse-ring.critical {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.35), rgba(239, 68, 68, 0));
}

.training-pulse-core {
    position: absolute;
    inset: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ecfdf5;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.training-pulse-core.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fef3c7;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.training-pulse-core.critical {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fef2f2;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.training-pulse-value {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.training-pulse-label {
    font-size: 0.6rem;
    opacity: 0.9;
    margin-top: 2px;
}

@keyframes training-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    70% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Dashboard skeleton scaffold */
.dashboard-grid .kpi-card.skeleton {
    position: relative;
    overflow: hidden;
}

.dashboard-grid .kpi-card.skeleton .kpi-label,
.dashboard-grid .kpi-card.skeleton .kpi-status,
.dashboard-grid .kpi-card.skeleton .kpi-value,
.dashboard-grid .kpi-card.skeleton .widget-content {
    color: transparent;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 100%);
    background-size: 200% 100%;
    border-radius: 8px;
    animation: dashboard-skeleton 1.2s ease-in-out infinite;
}

.dashboard-grid .kpi-card.skeleton .kpi-header {
    gap: 0.75rem;
}

.dashboard-grid .kpi-card.skeleton .widget-content {
    min-height: 160px;
    margin-top: 0.5rem;
}

.dashboard-grid .kpi-card.skeleton .kpi-value {
    min-height: 24px;
}

@keyframes dashboard-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .training-pulse-ring {
        animation: none;
    }
    .exploitation-banner {
        animation: none;
    }
}

/* ============================================
   Exploitation Alert Banner
   ============================================ */
.exploitation-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.4);
    animation: exploitation-pulse 2s infinite;
}

@keyframes exploitation-pulse {
    0%, 100% { border-color: rgba(239, 68, 68, 0.4); }
    50% { border-color: rgba(239, 68, 68, 0.8); }
}

.exploitation-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.exploitation-banner-icon svg {
    width: 22px;
    height: 22px;
    color: var(--non-compliant, #ff5566);
}

.exploitation-banner-content {
    flex: 1;
}

.exploitation-banner-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--non-compliant, #ff5566);
    margin-bottom: 2px;
}

.exploitation-banner-text {
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
}

.exploitation-banner-text strong {
    color: var(--non-compliant, #ff5566);
}

.exploitation-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.exploitation-banner-actions .btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    border: none;
    transition: all 0.2s;
}

.exploitation-banner-actions .btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ff5566;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.exploitation-banner-actions .btn-danger:hover {
    background: rgba(239, 68, 68, 0.35);
}

.exploitation-banner-actions .btn-secondary {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary, #94a3b8);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.exploitation-banner-actions .btn-secondary:hover {
    background: rgba(148, 163, 184, 0.25);
}

/* Exploitation alerts in the Alerts widget */
.exploitation-widget-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.exploitation-cve-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(239, 68, 68, 0.06);
    border-radius: 6px;
    font-size: 0.8rem;
    transition: background 0.2s;
    cursor: pointer;
}

.exploitation-cve-item:hover {
    background: rgba(239, 68, 68, 0.12);
}

.exploitation-cve-id {
    font-family: 'SF Mono', Monaco, monospace;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
}

.exploitation-cve-score {
    font-weight: 700;
    color: var(--non-compliant, #ff5566);
}

.exploitation-kev-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.15);
    color: #ff5566;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ============================================
   CSS-Only Tooltip System (.has-tip)
   ============================================ */
.has-tip {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted rgba(148, 163, 184, 0.5);
}

.has-tip::before,
.has-tip::after {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}

.has-tip::before {
    content: attr(data-tip);
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    max-width: 320px;
    min-width: 140px;
    width: max-content;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
    font-size: 0.78rem;
    line-height: 1.45;
    white-space: pre-line;
    text-align: left;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

.has-tip::after {
    content: '';
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border: 6px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.95);
}

.has-tip:hover::before,
.has-tip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Allow tooltip overflow in cards with overflow:hidden */
.kpi-card:has(.has-tip:hover) {
    overflow: visible;
}

/* Tooltip below variant — for elements near the top of the viewport */
.has-tip-below::before {
    bottom: auto;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-4px);
}

.has-tip-below::after {
    bottom: auto;
    top: calc(100% + 2px);
    transform: translateX(-50%) translateY(-4px);
    border-top-color: transparent;
    border-bottom-color: rgba(15, 23, 42, 0.95);
}

.has-tip-below:hover::before,
.has-tip-below:hover::after {
    transform: translateX(-50%) translateY(0);
}

/* Clickable count link in exploitation banner */
.exploitation-count-link {
    color: var(--non-compliant, #ff5566);
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.15s, text-shadow 0.15s;
    border-bottom: none;
}

.exploitation-count-link:hover {
    color: #ff8899;
    text-shadow: 0 0 12px rgba(255, 85, 102, 0.5);
}

/* ============================================
   Responder Launcher Modal
   ============================================ */
.responder-launcher-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: responder-fade-in 0.2s ease;
}

@keyframes responder-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.responder-launcher-modal {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    width: 90vw;
    max-width: 960px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(139, 92, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    animation: responder-slide-up 0.25s ease;
}

@keyframes responder-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.responder-launcher-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    background: inherit;
}

.responder-launcher-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--color-text, #e2e8f0);
}

.responder-launcher-header p {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: var(--color-text-muted, #94a3b8);
}

.responder-launcher-close {
    background: transparent;
    border: none;
    color: var(--color-text-muted, #94a3b8);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.responder-launcher-close:hover {
    color: #fff;
    background: rgba(239, 68, 68, 0.2);
}

.responder-launcher-close svg {
    width: 20px;
    height: 20px;
}

.responder-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.responder-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.responder-panel + .responder-panel {
    border-left: 1px solid rgba(148, 163, 184, 0.15);
}

.responder-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    flex-shrink: 0;
}

.responder-panel-header h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text, #e2e8f0);
    display: flex;
    align-items: center;
    gap: 8px;
}

.responder-panel-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    font-size: 0.75rem;
    font-weight: 600;
}

.responder-panel-search {
    padding: 8px 16px;
    flex-shrink: 0;
}

.responder-panel-search input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.6);
    color: var(--color-text, #e2e8f0);
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.15s;
}

.responder-panel-search input:focus {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.responder-panel-search input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.responder-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px 12px;
    /* Fade edges to hint at scrollable content (CSS-only, no JS needed) */
    mask-image: linear-gradient(
        to bottom,
        transparent 0px,
        black 8px,
        black calc(100% - 24px),
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0px,
        black 8px,
        black calc(100% - 24px),
        transparent 100%
    );
    /* Custom scrollbar — thin, translucent, purple accent */
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.35) transparent;
}

/* Webkit custom scrollbar */
.responder-panel-list::-webkit-scrollbar {
    width: 5px;
}
.responder-panel-list::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
}
.responder-panel-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 10px;
}
.responder-panel-list::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.55);
}

.responder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    gap: 10px;
}

.responder-item:hover {
    background: rgba(139, 92, 246, 0.1);
    transform: translateX(2px);
}

.responder-item.is-selected {
    background: rgba(139, 92, 246, 0.18);
    box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.35);
}

.responder-item.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.responder-item-info {
    flex: 1;
    min-width: 0;
}

.responder-item-title {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text, #e2e8f0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.responder-item-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted, #94a3b8);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.responder-item-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.responder-severity {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.responder-severity.critical { background: rgba(239, 68, 68, 0.15); color: #ff5566; }
.responder-severity.high { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
.responder-severity.medium { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.responder-severity.low { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }

.responder-kev-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.15);
    color: #ff5566;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.responder-panel-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--color-text-muted, #94a3b8);
    font-size: 0.85rem;
}

.responder-panel-loading {
    padding: 32px 16px;
    text-align: center;
    color: var(--color-text-muted, #94a3b8);
    font-size: 0.85rem;
}

.responder-panel-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* ── Footer: always visible at the bottom of the modal ── */
.responder-launcher-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(4px);
    gap: 12px;
}

.responder-launcher-selection {
    font-size: 0.82rem;
    color: var(--color-text-muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.responder-launcher-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.responder-launcher-cancel {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: transparent;
    color: var(--color-text-muted, #94a3b8);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.responder-launcher-cancel:hover {
    background: rgba(148, 163, 184, 0.1);
    color: var(--color-text, #e2e8f0);
}

.responder-launcher-launch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 8px;
    border: 2px solid var(--accent-secondary, #00d4aa);
    background: rgba(0, 212, 170, 0.12);
    color: var(--accent-secondary, #00d4aa);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.responder-launcher-launch:hover:not(:disabled) {
    background: rgba(0, 212, 170, 0.22);
    box-shadow: 0 0 16px rgba(0, 212, 170, 0.3);
    transform: translateY(-1px);
}

.responder-launcher-launch:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(148, 163, 184, 0.25);
    color: var(--color-text-muted, #94a3b8);
    background: transparent;
}

.responder-launcher-launch svg {
    flex-shrink: 0;
}

@media (max-width: 700px) {
    .responder-launcher-modal {
        max-height: 90vh;
    }
    .responder-panels {
        grid-template-columns: 1fr;
        /* Two stacked panels share available space equally */
        grid-template-rows: 1fr 1fr;
    }
    .responder-panel + .responder-panel {
        border-left: none;
        border-top: 1px solid rgba(148, 163, 184, 0.15);
    }
    .responder-launcher-footer {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }
    .responder-launcher-footer-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
