:root{
  --fire-red:#D64545;
  --fire-orange:#FF9A42;
  --fire-yellow:#FFD75A;
  --bg-dark:#020617;
  --bg-elevated:#0B0D11;
  --border-subtle:#1f2933;
  --text-main:#F9FAFB;
  --text-muted:#9CA3AF;
}
*{box-sizing:border-box;}
body{
  margin:0;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:radial-gradient(circle at top,#111827 0,#020617 45%,#000 100%);
  color:var(--text-main);
  -webkit-font-smoothing:antialiased;
}
.site-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 20px;
  background:rgba(2,6,23,0.96);
  backdrop-filter:blur(16px);
  border-bottom:1px solid #111827;
  position:sticky;
  top:0;
  z-index:20;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.brand img{
  width:32px;
  height:32px;
}
.brand-title{
  display:flex;
  flex-direction:column;
}
.brand-title span:first-child{
  font-size:20px;
  font-weight:600;
}
.brand-title span:last-child{
  font-size:11px;
  color:var(--text-muted);
}
.nav-links a{
  color:var(--text-muted);
  text-decoration:none;
  margin-left:18px;
  font-size:14px;
}
.nav-links a.active{
  color:var(--fire-orange);
}
.container{
  max-width:1180px;
  margin:26px auto 40px;
  padding:0 16px;
}
.grid-2{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);
  gap:20px;
}
@media (max-width:980px){
  .grid-2{grid-template-columns:1fr;}
  .site-header{flex-direction:column;align-items:flex-start;gap:8px;}
}
.card{
  background:rgba(15,23,42,0.96);
  border-radius:14px;
  padding:18px 18px 16px;
  border:1px solid var(--border-subtle);
  box-shadow:0 18px 40px rgba(0,0,0,0.6);
}
.card h2{
  margin:0 0 8px;
  font-size:18px;
  font-weight:600;
}
.card p.description{
  margin:0;
  font-size:13px;
  color:var(--text-muted);
}
details.project-info{
  margin:8px 0 14px;
  border-radius:10px;
  border:1px solid #111827;
  background:#020617;
  padding:8px 10px 4px;
}
details.project-info summary{
  cursor:pointer;
  font-size:13px;
  font-weight:500;
  color:var(--text-main);
  list-style:none;
}
details.project-info summary::-webkit-details-marker{display:none;}
details.project-info summary::before{
  content:"▶";
  display:inline-block;
  font-size:10px;
  margin-right:6px;
  transform:translateY(-1px);
}
details[open].project-info summary::before{
  content:"▼";
}
.project-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:8px 14px;
  margin-top:10px;
}
label{
  display:block;
  margin-top:10px;
  font-size:12px;
  color:var(--text-muted);
}
input[type="number"],
input[type="text"],
input[type="date"],
select,
textarea{
  width:100%;
  margin-top:4px;
  padding:9px 10px;
  border-radius:9px;
  border:1px solid #111827;
  background:#020617;
  color:var(--text-main);
  font-size:14px;
}
textarea{
  min-height:54px;
  resize:vertical;
}
.helper{
  font-size:11px;
  color:var(--text-muted);
  margin-top:2px;
}
.row-inline{
  display:flex;
  gap:10px;
}
.row-inline > *{flex:1;}
.btn{
  border:none;
  border-radius:10px;
  padding:10px 16px;
  font-size:14px;
  cursor:pointer;
  font-weight:500;
}
.btn-primary{
  background:linear-gradient(135deg,var(--fire-yellow),var(--fire-red));
  color:#111827;
}
.btn-secondary{
  background:#111827;
  color:var(--text-main);
}
.btn-block{width:100%;margin-top:12px;}
.btn-sm{padding:7px 10px;font-size:12px;}
.actions-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
  align-items:center;
}
.result-row{
  display:flex;
  justify-content:space-between;
  border-bottom:1px solid #111827;
  padding:6px 0;
  font-size:13px;
}
.result-row:last-child{border-bottom:none;}
.result-label{color:var(--text-muted);}
.result-value{font-weight:600;}
.chart-card{
  margin-top:14px;
  position:relative;
}
.chart-card canvas{
  width:100%;
  height:230px;
  border-radius:10px;
  background:#020617;
  border:1px solid #111827;
}
.chart-watermark{
  position:absolute;
  inset:0;
  background:url('firecalc_logo.svg') center/120px 120px no-repeat;
  opacity:0.10;
  pointer-events:none;
}
.diagram-wrap{
  margin-top:18px;
}
.diagram-wrap svg{
  width:100%;
  height:auto;
  border-radius:10px;
  border:1px solid #111827;
  background:#020617;
}
.footer{
  margin-top:22px;
  font-size:11px;
  text-align:center;
  color:var(--text-muted);
}

/* Yellow warning banner (under validation) */
.warning-banner{
  width:100%;
  background:#FACC15;
  color:#1F2937;
  padding:10px 16px;
  text-align:center;
  font-weight:600;
  font-size:14px;
  border-bottom:2px solid #D97706;
}

/* Map container for hydrants */
.map-card{
  margin-top:18px;
}
#hydrantMap{
  width:100%;
  height:260px;
  border-radius:10px;
  border:1px solid #111827;
  background:#020617;
}
