body { font-family: Arial, sans-serif; margin: 0; padding: 0; height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
button { margin: 5px; padding: 8px 10px; }
button.primary { background: #0066cc; color: white; font-weight: bold; }
button.primary:hover { background: #0052a3; }
input { margin: 5px; padding: 5px; }
.filters { height: 5vh; display: flex; align-items: center; padding: 0 10px; background: #f9f9f9; border-bottom: 1px solid #ddd; overflow-x: auto; }
.breadcrumbs { height: 3vh; display: flex; align-items: center; padding: 0 10px; background: #fff; border-bottom: 1px solid #ddd; font-size: 0.9em; }
.breadcrumbs span { cursor: pointer; color: #0066cc; }
.breadcrumbs span:hover { text-decoration: underline; }
.breadcrumbs span:last-child { color: #333; cursor: default; }
.breadcrumbs span:last-child:hover { text-decoration: none; }
.chart-container { height: 62vh; display: flex; flex-direction: row; padding: 0; background: white; box-sizing: border-box; width: 100%; }
canvas { flex: 1; margin: 0; max-width: 50%; }
.table-container { height: 30vh; overflow-y: auto; position: relative; }
table { width: 100%; border-collapse: collapse; }
thead { position: sticky; top: 0; background: #f2f2f2; z-index: 5; }
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
th { background-color: #f2f2f2; cursor: pointer; }
th:hover { background-color: #ddd; }
h1 { margin: 0; padding: 10px; }

/* Modal Styles */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4); }
.modal-content { background-color: #fefefe; margin: 5% auto; padding: 0; border: 1px solid #888; width: 80%; max-width: 700px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.modal-header { padding: 15px 20px; background: #f9f9f9; border-bottom: 1px solid #ddd; display: flex; justify-content: space-between; align-items: center; border-radius: 8px 8px 0 0; }
.modal-header h2 { margin: 0; font-size: 1.3em; }
.modal-body { padding: 20px; max-height: 60vh; overflow-y: auto; }
.modal-footer { padding: 15px 20px; background: #f9f9f9; border-top: 1px solid #ddd; display: flex; justify-content: flex-end; gap: 10px; border-radius: 0 0 8px 8px; }
.close { color: #aaa; font-size: 28px; font-weight: bold; cursor: pointer; }
.close:hover, .close:focus { color: #000; text-decoration: none; }

/* Rule Item Styles */
.rule-item { border: 1px solid #ddd; padding: 15px; margin-bottom: 10px; border-radius: 5px; background: #f9f9f9; }
.rule-item label { display: block; margin-bottom: 8px; font-weight: bold; font-size: 0.9em; color: #333; }
.rule-item input, .rule-item select { width: 100%; padding: 8px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.rule-item .rule-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.rule-item .rule-header input { width: calc(100% - 40px); margin: 0; }
.rule-item button.delete-rule { background: #dc3545; color: white; padding: 5px 10px; border: none; border-radius: 4px; cursor: pointer; }
.rule-item button.delete-rule:hover { background: #c82333; }
