:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --border: #e2e8f0;
    --accent: #22c55e;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}
.container {
    width: 100%;
    max-width: 95%;
    background: var(--surface);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
h1 { margin-bottom: 5px; color: #0f172a; font-size: 28px; }
.subtitle { margin-top: 0; color: #64748b; margin-bottom: 25px; }
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 25px; gap: 10px; }
.tab-btn { padding: 12px 20px; border: none; background: none; font-size: 15px; font-weight: 600; color: #64748b; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); padding: 20px; border-radius: 8px; display: flex; flex-direction: column; }
.card.full-width { grid-column: 1 / -1; }
h3 { margin-top: 0; color: #0f172a; font-size: 18px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.formula-text { font-size: 13px; color: var(--primary); font-family: monospace; background: #f0f9ff; padding: 6px; border-radius: 4px; margin-top: 0; }
label { font-size: 14px; font-weight: 500; margin-top: 12px; margin-bottom: 4px; }
input, select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; background: #fafafa; }
input:focus, select:focus { outline: none; border-color: var(--primary); background: #fff; }
button { margin-top: 18px; padding: 10px; background: var(--primary); color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; }
button:hover { background: var(--primary-dark); }
.primary-btn { background: #0f172a; padding: 12px; }
.primary-btn:hover { background: #1e293b; }
.result { margin-top: 15px; padding: 12px; background: #f0fdf4; border-left: 4px solid var(--accent); font-weight: 600; border-radius: 0 6px 6px 0; font-size: 15px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-bottom: 10px; }
.fittings-grid { background: #f8fafc; padding: 15px; border-radius: 6px; border: 1px dashed var(--border); }
.advanced-results { margin-top: 20px; padding: 20px; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; }
.advanced-results p { margin: 8px 0; font-size: 15px; }
.final-highlight { font-size: 18px !important; color: #16a34a; background: #f0fdf4; padding: 10px; border-radius: 6px; border: 1px solid #bbf7d0; margin-top: 15px !important; }
/* PUMP DIAGNOSTICS ADDITIONAL STYLES */
#pump-diagnostics .fittings-grid {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    margin-top: 10px;
    margin-bottom: 15px;
}

#pump-diagnostics small {
    color: #64748b;
    font-size: 11px;
    display: block;
    margin-top: 2px;
}
@media (max-width: 768px) {
    .tabs { flex-direction: column; }
}







p.subtitle { 
    color: #64748b; 
    margin: 0; 
    font-size: 1.1rem; 
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; }
}


.form-group {
    margin-bottom: 16px;
}



.helper-text {
    display: block;
    color: #64748b;
    margin-top: 4px;
}


.results-box {
    margin-top: 20px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 16px;
    font-size: 0.95rem;
}

.results-box div {
    margin-bottom: 8px;
}

.results-box div:last-child {
    margin-bottom: 0;
}

.highlight {
    font-weight: bold;
    color: var(--primary);
}

.warning {
    color: #b91c1c;
    font-weight: bold;
}

.safe {
    color: #15803d;
    font-weight: bold;
}