:root{
  --green:#176c3a;
  --green2:#27a95c;
  --dark:#101810;
  --bg:#eef7f0;
  --card:#ffffff;
  --muted:#65756a;
  --red:#b42318;
  --orange:#f59e0b;
  --blue:#2563eb;
  --shadow:0 8px 24px rgba(0,0,0,.10);
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  background:linear-gradient(180deg,#e7f7ec,#f8fbf8);
  color:var(--dark);
}

header{
  background:linear-gradient(135deg,var(--green),var(--green2));
  color:white;
  padding:20px 16px;
  text-align:center;
  box-shadow:var(--shadow);
}

header h1{
  margin:0;
  font-size:28px;
  font-weight:900;
}

header p{
  margin:6px 0 0;
  opacity:.92;
}

main{
  max-width:850px;
  margin:auto;
  padding:16px;
  padding-bottom:110px;
}

.page{
  display:none;
}

.page.active{
  display:block;
}

h2{
  color:var(--green);
  margin-top:0;
}

h3{
  margin-bottom:8px;
}

input,
select,
textarea{
  width:100%;
  padding:14px;
  margin:8px 0 15px;
  border:1px solid #d2ddd4;
  border-radius:14px;
  background:white;
  font-size:16px;
}

textarea{
  min-height:90px;
}

label{
  font-weight:700;
}

button{
  width:100%;
  padding:14px;
  margin-top:8px;
  border:0;
  border-radius:14px;
  background:linear-gradient(135deg,var(--green),var(--green2));
  color:white;
  font-size:16px;
  font-weight:800;
}

button:active{
  transform:scale(.98);
}
.stats{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
  margin:20px 0;
}

.stat-card{
  background:var(--card);
  border-radius:18px;
  padding:18px;
  text-align:center;
  box-shadow:var(--shadow);
}

.stat-card span{
  display:block;
  color:var(--muted);
  margin-bottom:8px;
}

.stat-card strong{
  font-size:30px;
  color:var(--green);
}

.summary-card{
  background:white;
  border-radius:18px;
  padding:16px;
  margin:18px 0;
  box-shadow:var(--shadow);
}

.summary-card p{
  margin:8px 0;
}

.materials{
  background:white;
  border-radius:18px;
  padding:18px;
  margin:18px 0;
  box-shadow:var(--shadow);
}

.materials hr{
  margin:18px 0;
}

.materials p{
  margin:10px 0;
}

.price{
  text-align:center;
  font-size:52px;
  font-weight:900;
  color:var(--green);
  margin:25px 0;
}

.hint{
  margin-top:-6px;
  color:var(--muted);
}

#savedList .materials{
  margin-bottom:18px;
}

#savedList button{
  margin-top:10px;
}

nav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  display:grid;
  grid-template-columns:repeat(8,1fr);
  background:white;
  border-top:1px solid #ddd;
  box-shadow:0 -4px 18px rgba(0,0,0,.08);
}

nav button{
  background:white;
  color:var(--green);
  border-radius:0;
  margin:0;
  font-size:22px;
  padding:16px 4px;
}

nav button:hover{
  background:#edf8f1;
}

button.delete{
  background:linear-gradient(135deg,#991b1b,#dc2626);
}

.good{
  color:#16a34a;
  font-weight:bold;
}

.warn{
  color:#d97706;
  font-weight:bold;
}

.bad{
  color:#dc2626;
  font-weight:bold;
}

@media(max-width:700px){

.stats{
grid-template-columns:1fr;
}

.price{
font-size:44px;
}

header h1{
font-size:24px;
}

nav button{
font-size:18px;
padding:14px 2px;
}

}