* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background-color: #0f172a;
    color: #e2e8f0;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #1e293b;
    border-right: 1px solid #334155;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 32px;
}

.logo-icon {
    font-size: 1.6rem;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active {
    background: #334155;
    color: #f8fafc;
}

.sidebar-footer {
    color: #64748b;
    font-size: 0.8rem;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #334155;
}

/* Main Content */
.content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.subtitle {
    color: #94a3b8;
    margin-top: 4px;
}

.refresh-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1e293b;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #334155;
    font-size: 0.9rem;
}

.live-indicator {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

.btn-refresh {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-refresh:hover {
    background: #2563eb;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
}

.kpi-title {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 10px 0 4px;
}

.kpi-value.highlight {
    color: #f59e0b;
}

.kpi-value .unit {
    font-size: 1.1rem;
    font-weight: 500;
    color: #94a3b8;
}

.kpi-sub {
    font-size: 0.8rem;
    color: #64748b;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.badge {
    background: #334155;
    color: #38bdf8;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

.module-box {
    line-height: 1.6;
    color: #cbd5e1;
}

.module-box ol {
    margin-left: 20px;
    margin-top: 10px;
}

.module-box code {
    background: #0f172a;
    padding: 2px 6px;
    border-radius: 4px;
    color: #f59e0b;
    font-family: monospace;
}

@media (max-width: 900px) {
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .charts-grid {
        grid-template-columns: 1fr;
    }
}
