* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
}
body {
    background: #f4f7fc;
    padding: 24px 20px;
    color: #1e2a3e;
}
.container { max-width: 1300px; margin: 0 auto; }
header { text-align: center; margin-bottom: 28px; }
header h1 { font-size: 1.8rem; font-weight: 600; color: #1e466e; }
header p { color: #5b6f88; }

.card {
    background: white;
    border-radius: 20px;
    border: 1px solid #e2edf2;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.card h2 { font-size: 1.4rem; margin-bottom: 18px; border-left: 4px solid #3b82b6; padding-left: 14px; font-weight: 500; }

.sliders-container { display: flex; flex-direction: column; gap: 20px; margin-bottom: 30px; }
.slider-item { display: flex; flex-direction: column; gap: 6px; }
.slider-item label { font-weight: 500; display: flex; justify-content: space-between; }
.param-value { font-family: monospace; background: #eef2f6; padding: 2px 8px; border-radius: 20px; font-size: 0.8rem; }
input[type="range"] { width: 100%; height: 5px; -webkit-appearance: none; background: #dfe6ef; border-radius: 10px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; background: #2c6e9e; border-radius: 50%; cursor: pointer; }

.btn-primary { background: #2c6e9e; border: none; color: white; font-weight: 500; padding: 12px 20px; border-radius: 40px; width: 100%; font-size: 1rem; cursor: pointer; transition: 0.15s; }
.btn-primary:hover { background: #1e567e; }
.btn-secondary { background: #edf2f7; border: 1px solid #d0ddeb; padding: 8px 16px; border-radius: 30px; font-weight: 500; cursor: pointer; color: #1e466e; }
.btn-secondary:hover { background: #e2e8f0; }

.result-card { text-align: center; }
.gauge-wrapper { position: relative; display: flex; justify-content: center; margin: 10px 0; }
.gauge-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 1.8rem; font-weight: bold; display: flex; align-items: baseline; gap: 2px; }
#efficiencyValue { font-size: 2rem; color: #1e466e; }
.efficiency-level { font-size: 1.1rem; font-weight: 600; background: #ecf3fa; display: inline-block; padding: 4px 18px; border-radius: 30px; margin-top: 8px; }
.interpretation { margin-top: 18px; font-size: 0.75rem; background: #f8fafc; border-radius: 18px; padding: 12px; text-align: left; }
.interpretation ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-top: 6px; }
.interpretation li { background: white; padding: 2px 12px; border-radius: 20px; border: 1px solid #e2edf2; }

.graph-selector { margin-bottom: 15px; display: flex; align-items: center; gap: 12px; }
.graph-canvas { background: #ffffff; border-radius: 16px; width: 100%; height: auto; border: 1px solid #e9edf2; margin-top: 6px; }
.graph-separator { height: 1px; background: #e9edf2; margin: 18px 0; }

.rules-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.rules-list { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.rule-item { background: #fafcff; border-left: 4px solid #8bb9d4; padding: 10px 14px; border-radius: 16px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.rule-text { font-size: 0.85rem; font-weight: 500; }
.rule-actions button { background: none; border: none; font-size: 1.1rem; cursor: pointer; margin-left: 8px; opacity: 0.7; }
.rule-actions button:hover { opacity: 1; }
.edit-rule { color: #2c6e9e; }
.delete-rule { color: #b91c1c; }

.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.4); justify-content: center; align-items: center; }
.modal-content { background: white; max-width: 600px; width: 90%; border-radius: 28px; padding: 24px; border: 1px solid #dee6ef; }
.close-modal { float: right; font-size: 26px; font-weight: bold; cursor: pointer; }
.form-group { margin: 18px 0; }
.form-group label { font-weight: 500; display: block; margin-bottom: 6px; }
select, .form-group input { width: 100%; padding: 8px 12px; border-radius: 30px; border: 1px solid #ccdae6; background: white; }
.modal-buttons { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

.dashboard { display: flex; flex-wrap: wrap; gap: 24px; }
.left-panel { flex: 1.2; min-width: 280px; }
.right-panel { flex: 1.8; min-width: 380px; }
@media (max-width: 780px) { .dashboard { flex-direction: column; } }