/* ====================================================================
   NETWORK INSPECTOR - Premium Deep Dive Dashboard
   ==================================================================== */

.netstat-window {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: var(--io-surface-raised);
    overflow: hidden;
    font-size: 14px;
}

/* ====================================================================
   HEADER - Title + Live Status
   ==================================================================== */

.netstat-header {
    padding: var(--io-space-md) var(--io-space-lg);
    background: var(--io-surface-base);
    border-bottom: 1px solid var(--io-border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    font-size: 16px;
}

.netstat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(var(--io-border-fade-base), 0.4) 20%,
        rgba(var(--io-border-fade-base), 0.6) 50%,
        rgba(var(--io-border-fade-base), 0.4) 80%,
        transparent 100%
    );
    pointer-events: none;
}

.netstat-title {
    display: flex;
    align-items: center;
    gap: var(--io-space-sm);
    text-transform: lowercase;
    letter-spacing: 0.02em;
    color: var(--io-text-secondary);
}

.netstat-title i {
    color: var(--io-accent);
    opacity: 0.7;
    font-size: 14px;
}

.netstat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--io-accent);
    font-weight: bold;
    font-size: 14px;
}

.netstat-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--io-accent);
    border-radius: 50%;
    animation: netstat-pulse 1s infinite;
}

@keyframes netstat-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ====================================================================
   CONTENT - Sidebar + Main Sections
   ==================================================================== */

.netstat-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* ====================================================================
   SIDEBAR - Summary Stats
   ==================================================================== */

.netstat-sidebar {
    width: 220px;
    background: var(--io-surface-base);
    border-right: 1px solid var(--io-border-subtle);
    padding: var(--io-space-md);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--io-space-lg);
    position: relative;
}

.netstat-sidebar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(var(--io-border-fade-base), 0.3) 15%,
        rgba(var(--io-border-fade-base), 0.6) 50%,
        rgba(var(--io-border-fade-base), 0.3) 85%,
        transparent 100%
    );
    pointer-events: none;
}

.netstat-sidebar-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.netstat-sidebar-label {
    color: var(--io-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 9px;
}

.netstat-sidebar-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    border-bottom: 1px solid rgba(var(--io-border-fade-base), 0.2);
}

.netstat-sidebar-item:last-child {
    border-bottom: none;
}

.netstat-sidebar-key {
    color: var(--io-text-tertiary);
    flex-shrink: 0;
}

.netstat-sidebar-value {
    color: var(--io-accent);
    font-weight: bold;
    text-align: right;
    margin-left: 8px;
    font-family: var(--io-font-mono);
}

.netstat-sidebar-value.error {
    color: var(--io-error);
}

.netstat-sidebar-value.success {
    color: var(--io-success);
}

/* ====================================================================
   MAIN - 4 Column Sections
   ==================================================================== */

.netstat-main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.netstat-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--io-border-subtle);
    position: relative;
}

.netstat-section:last-child {
    border-right: none;
}

.netstat-section::before {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(var(--io-border-fade-base), 0.2) 15%,
        rgba(var(--io-border-fade-base), 0.4) 50%,
        rgba(var(--io-border-fade-base), 0.2) 85%,
        transparent 100%
    );
    pointer-events: none;
}

.netstat-section-header {
    padding: var(--io-space-sm) var(--io-space-md);
    background: var(--io-surface-base);
    border-bottom: 1px solid var(--io-border-subtle);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--io-text-tertiary);
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.netstat-section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(var(--io-border-fade-base), 0.3) 20%,
        rgba(var(--io-border-fade-base), 0.3) 80%,
        transparent 100%
    );
    pointer-events: none;
}

.netstat-section-header i {
    color: var(--io-accent);
    opacity: 0.6;
    font-size: 9px;
}

.netstat-section-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--io-space-sm);
}

/* ====================================================================
   DATA ROWS - Key/Value Pairs
   ==================================================================== */

.netstat-data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px var(--io-space-sm);
    border-left: 2px solid transparent;
    margin-bottom: 2px;
    transition: all var(--io-transition-base);
    cursor: pointer;
}

.netstat-data-row:hover {
    background: var(--io-surface-hover);
    border-left-color: var(--io-accent);
}

.netstat-data-key {
    color: var(--io-text-tertiary);
    white-space: nowrap;
    margin-right: 12px;
}

.netstat-data-value {
    color: var(--io-accent);
    font-weight: bold;
    text-align: right;
    white-space: nowrap;
    font-family: var(--io-font-mono);
}

.netstat-data-value.error {
    color: var(--io-error);
}

.netstat-data-value.warning {
    color: var(--io-warning);
}

.netstat-data-value.success {
    color: var(--io-success);
}

/* ====================================================================
   SPARKLINE - SVG Chart
   ==================================================================== */

.netstat-sparkline {
    width: 100%;
    height: 40px;
    margin-top: 8px;
}

.netstat-sparkline polyline {
    fill: none;
    stroke: var(--io-accent);
    stroke-width: 1.5;
    opacity: 0.7;
}

/* ====================================================================
   SCROLLBARS
   ==================================================================== */

.netstat-sidebar::-webkit-scrollbar,
.netstat-section-content::-webkit-scrollbar {
    width: 4px;
}

.netstat-sidebar::-webkit-scrollbar-track,
.netstat-section-content::-webkit-scrollbar-track {
    background: transparent;
}

.netstat-sidebar::-webkit-scrollbar-thumb,
.netstat-section-content::-webkit-scrollbar-thumb {
    background: var(--io-accent-subtle);
    border-radius: 2px;
}

.netstat-sidebar::-webkit-scrollbar-thumb:hover,
.netstat-section-content::-webkit-scrollbar-thumb:hover {
    background: var(--io-accent);
}