:root {
    --neo-bg: #f8fafc;
    --neo-card-bg: #ffffff;
    --neo-border: #0f172a;
    --neo-shadow: #0f172a;
    
    --neo-yellow: #fde047;
    --neo-cyan: #38bdf8;
    --neo-green: #4ade80;
    --neo-orange: #fb923c;
    --neo-pink: #f472b6;
    --neo-purple: #c084fc;
    --neo-red: #f87171;

    --text-main: #0f172a;
    --text-muted: #475569;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --border-w: 2.5px;
    --shadow-offset: 4px 4px 0px var(--neo-shadow);
    --shadow-offset-lg: 6px 6px 0px var(--neo-shadow);
}

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

body {
    background-color: var(--neo-bg);
    background-image: 
        radial-gradient(#cbd5e1 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    padding: 24px;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    background: var(--neo-card-bg);
    border: var(--border-w) solid var(--neo-border);
    box-shadow: var(--shadow-offset-lg);
    border-radius: 4px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-badge {
    background: var(--neo-yellow);
    border: var(--border-w) solid var(--neo-border);
    box-shadow: 2px 2px 0px var(--neo-border);
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 16px;
    padding: 8px 12px;
    letter-spacing: -0.5px;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-row h1 {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.tagline {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 2px;
}

.badge {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border: 1.5px solid var(--neo-border);
    text-transform: uppercase;
    font-family: var(--font-mono);
    background: #fff;
    box-shadow: 1.5px 1.5px 0px var(--neo-border);
}

.badge-yellow { background: var(--neo-yellow); }
.badge-cyan { background: var(--neo-cyan); }
.badge-green { background: var(--neo-green); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--neo-green);
    border: var(--border-w) solid var(--neo-border);
    box-shadow: 2px 2px 0px var(--neo-border);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
}

.action-btn-group {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 800;
    font-family: var(--font-mono);
    text-transform: uppercase;
    cursor: pointer;
    border: var(--border-w) solid var(--neo-border);
    box-shadow: 3px 3px 0px var(--neo-border);
    background: #fff;
    transition: all 0.1s ease;
}

.btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0px var(--neo-border);
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px var(--neo-border);
}

.btn-yellow { background: var(--neo-yellow); }
.btn-cyan { background: var(--neo-cyan); }
.btn-orange { background: var(--neo-orange); }

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.kpi-card {
    background: var(--neo-card-bg);
    border: var(--border-w) solid var(--neo-border);
    box-shadow: var(--shadow-offset);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid var(--neo-border);
    padding-bottom: 6px;
}

.kpi-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.kpi-value-row {
    margin: 12px 0 6px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 900;
    font-family: var(--font-mono);
    color: var(--text-main);
}

.kpi-unit {
    font-size: 14px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.kpi-footer {
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.text-alert { color: #dc2626; }
.text-ok { color: #15803d; }

/* Panel System */
.panel {
    background: var(--neo-card-bg);
    border: var(--border-w) solid var(--neo-border);
    box-shadow: var(--shadow-offset);
    padding: 18px 20px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: var(--border-w) solid var(--neo-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.panel-head h2 {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.core-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.core-box {
    background: #f8fafc;
    border: 2px solid var(--neo-border);
    box-shadow: 2px 2px 0px var(--neo-border);
    padding: 12px;
}

.core-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 800;
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.core-bar-bg {
    height: 10px;
    background: #e2e8f0;
    border: 1.5px solid var(--neo-border);
    overflow: hidden;
}

.core-bar-fill {
    height: 100%;
    background: var(--neo-cyan);
    border-right: 1.5px solid var(--neo-border);
    transition: width 0.3s ease;
}

.core-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    margin-top: 8px;
    color: var(--text-muted);
}

/* Split View */
.split-view {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

@media (max-width: 1024px) {
    .split-view {
        grid-template-columns: 1fr;
    }
}

.chart-box {
    height: 280px;
    position: relative;
}

.queue-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.queue-card {
    background: #f8fafc;
    border: 2px solid var(--neo-border);
    box-shadow: 2px 2px 0px var(--neo-border);
    padding: 10px 14px;
}

.queue-card-head {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 800;
    font-family: var(--font-mono);
    margin-bottom: 6px;
}

.queue-bar-bg {
    height: 12px;
    background: #e2e8f0;
    border: 1.5px solid var(--neo-border);
    overflow: hidden;
}

.queue-bar-fill {
    height: 100%;
    background: var(--neo-yellow);
    border-right: 1.5px solid var(--neo-border);
    transition: width 0.3s ease;
}

.queue-card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-top: 6px;
}

/* Data Table */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
    font-family: var(--font-mono);
}

.data-table th {
    padding: 10px 12px;
    background: #f1f5f9;
    border: 1.5px solid var(--neo-border);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
}

.data-table td {
    padding: 10px 12px;
    border: 1.5px solid var(--neo-border);
    background: #fff;
}

.tag-badge {
    padding: 2px 6px;
    border: 1.5px solid var(--neo-border);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.tag-voice { background: var(--neo-green); }
.tag-gaming { background: var(--neo-cyan); }
.tag-video { background: var(--neo-purple); }
.tag-web { background: var(--neo-yellow); }
.tag-bulk { background: var(--neo-orange); }

/* Packet Inspector */
.inspector-layout {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 16px;
}

@media (max-width: 900px) {
    .inspector-layout {
        grid-template-columns: 1fr;
    }
}

.packet-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.packet-item {
    background: #f8fafc;
    border: 2px solid var(--neo-border);
    box-shadow: 2px 2px 0px var(--neo-border);
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.1s ease;
}

.packet-item:hover {
    background: #f1f5f9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px var(--neo-border);
}

.packet-item.active {
    background: var(--neo-yellow);
    box-shadow: 3px 3px 0px var(--neo-border);
}

.packet-item-top {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 800;
    font-family: var(--font-mono);
}

.packet-item-bottom {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
}

.packet-details-card {
    background: #f8fafc;
    border: 2px solid var(--neo-border);
    box-shadow: 2px 2px 0px var(--neo-border);
    padding: 16px;
    font-family: var(--font-mono);
}

.details-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.dissection-header {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 1.5px solid var(--neo-border);
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.dissection-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
}

.hex-box {
    background: #0f172a;
    color: #38bdf8;
    padding: 12px;
    border: 2px solid var(--neo-border);
    font-size: 11px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-x: auto;
}

/* Footer */
.footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--neo-card-bg);
    border: var(--border-w) solid var(--neo-border);
    box-shadow: var(--shadow-offset);
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-muted);
}

.footer-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag-pill {
    background: #f1f5f9;
    border: 1.5px solid var(--neo-border);
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 800;
}
