* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: radial-gradient(circle at top right, #110d26, #07050f);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Dashboard Parent Container */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR NAVIGATION --- */
.sidebar {
    width: 260px;
    background: rgba(13, 10, 28, 0.6);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 10;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.brand-logo, .footer-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #7000ff, #bc34fa);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
}

.brand-info h3, .footer-info h3 {
    font-size: 14px;
    font-weight: 600;
}

.brand-info p, .footer-info p {
    font-size: 11px;
    color: #8c88a5;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: #8c88a5;
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.menu-item i {
    font-size: 16px;
}

.menu-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}

.menu-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(188, 52, 250, 0.2) 0%, rgba(188, 52, 250, 0.02) 100%);
    border-right: 3px solid #bc34fa;
    box-shadow: inset 4px 0 10px rgba(188, 52, 250, 0.15);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.version-tag {
    font-size: 10px;
    color: #524e6e;
    width: 100%;
    margin-top: 8px;
}

/* --- MAIN DASHBOARD CONTENT AREA --- */
.main-content {
    flex-grow: 1;
    padding: 30px 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: calc(100% - 260px);
}

/* Top Nav Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.search-bar {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 300px;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    width: 100%;
    font-size: 14px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    background: transparent;
    border: none;
    color: #8c88a5;
    font-size: 18px;
    cursor: pointer;
    position: relative;
    padding: 4px;
}

.action-btn:hover {
    color: #fff;
}

.badge-btn::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    background: #ff3366;
    border-radius: 50%;
}

.user-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Dashboard Title Row */
.dashboard-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.main-title {
    font-size: 26px;
    font-weight: 500;
    color: #ffffff;
}

.status-badge {
    background: rgba(0, 230, 115, 0.1);
    border: 1px solid #00e673;
    color: #00e673;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 12px;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(0, 230, 115, 0.15);
}

.section-title {
    font-size: 15px;
    color: #8c88a5;
    font-weight: 500;
    margin-bottom: 15px;
}

/* --- REUSABLE CARDS & GLASSMORPHISM --- */
.card {
    background: rgba(18, 14, 38, 0.4);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* --- METRICS GRID & GLOW EFFECTS --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.metric-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 180px;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #a4a0c0;
}

.metric-value {
    font-size: 28px;
    font-weight: 600;
    margin-top: 5px;
}

.chart-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.wave-chart, .wave-fill-chart {
    width: 100%;
    height: 45px;
}

.flat-line {
    width: 100%;
    height: 2px;
}

.flat-line.red {
    background: #ff3366;
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.8);
}

.card-timeline {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #524e6e;
}

/* Specific Glow Variations */
.purple-glow {
    box-shadow: inset 0 0 20px rgba(188, 52, 250, 0.05), 0 10px 30px rgba(0,0,0,0.2);
}
.blue-glow {
    box-shadow: inset 0 0 20px rgba(37, 117, 252, 0.05), 0 10px 30px rgba(0,0,0,0.2);
}
.red-glow {
    box-shadow: inset 0 0 20px rgba(255, 51, 102, 0.05), 0 10px 30px rgba(0,0,0,0.2);
}

/* Helpers */
.text-purple { color: #bc34fa; }
.text-blue { color: #2575fc; }
.text-red { color: #ff3366; }

/* --- DATA HUB AREA --- */
.data-hub-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

/* Table Card Layout */
.table-card-header, .log-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-card-header h3, .log-card-header h3 {
    font-size: 15px;
    font-weight: 500;
}

.dropdown-select {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 6px;
    color: #a4a0c0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.responsive-table-wrapper {
    overflow-x: auto;
}

.nodes-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.nodes-table th {
    color: #524e6e;
    font-weight: 500;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.nodes-table td {
    padding: 10px 0;
    color: #c5c1e0;
    vertical-align: middle;
}

.nodes-table tr.highlighted-row {
    background: rgba(255, 255, 255, 0.02);
}
.nodes-table tr.highlighted-row td {
    color: #fff;
}

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
}
.status-dot.green { background: #00e673; }

/* Progress/Load Bars */
.progress-bar {
    height: 6px;
    border-radius: 3px;
    background: #2575fc;
}
.progress-bar.blue { background: linear-gradient(90deg, #1d2b64, #2575fc); }
.progress-bar.green-bar { background: linear-gradient(90deg, #11998e, #38ef7d); }
.progress-bar.red-bar { background: linear-gradient(90deg, #cb2d3e, #ef473a); }

/* --- TERMINAL CARD --- */
.log-card {
    display: flex;
    flex-direction: column;
}

.terminal-container {
    background: rgba(5, 3, 13, 0.9);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 15px;
    flex-grow: 1;
    font-family: monospace;
    font-size: 12px;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    color: #00e673;
    margin-bottom: 10px;
}

.terminal-body {
    overflow-y: auto;
    max-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-item {
    color: #a4a0c0;
    line-height: 1.4;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1100px) {
    .data-hub-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 850px) {
    .dashboard-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    .main-content {
        width: 100%;
        padding: 20px;
    }
}

@media (max-width: 580px) {
    .dashboard-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .search-bar {
        width: 100%;
    }
}