* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f4f6f9;
  padding: 40px;
  color: #222;
}

.container {
  max-width: 1200px;
  margin: auto;
}

.hero {
  background: linear-gradient(135deg, #0077cc, #005fa3);
  color: white;
  padding: 50px;
  border-radius: 14px;
  text-align: center;
  margin-bottom: 30px;
}

.calculator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.inputs,
.results {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

h2 {
  margin-bottom: 25px;
}

label {
  display: block;
  margin-top: 18px;
  margin-bottom: 8px;
  font-weight: bold;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.material-row {
  display: grid;
  grid-template-columns: 1fr 120px 45px;
  gap: 10px;
  margin-bottom: 10px;
}

.remove-material {
  background: #cc3333;
}

.add-material-btn {
  margin-top: 10px;
  width: 100%;
  background: #444;
}

.button-group {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

button {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: #0077cc;
  color: white;
  cursor: pointer;
}

.reset-btn {
  background: #666;
}

.print-btn {
  background: #198754;
}

.result-box {
  background: #f7f9fc;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.result-box span {
  display: block;
  margin-bottom: 10px;
  color: #666;
}

.result-box strong {
  font-size: 28px;
  color: #0077cc;
}

.warning-box {
  background: #fff3cd;
  border-left: 5px solid #ffcc00;
  padding: 18px;
  margin-top: 20px;
}

.customer-quote {
  margin-top: 35px;
  border: 2px solid #0077cc;
  border-radius: 12px;
  padding: 25px;
}

.quote-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
}

.quote-section {
  margin-bottom: 25px;
}

.quote-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.materials-section {
  margin: 25px 0;
}

.materials-section h3 {
  margin-bottom: 15px;
}

#quoteMaterialsList div {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.total-materials {
  border-top: 2px solid #ccc;
  margin-top: 15px;
  font-weight: bold;
}

.quote-total {
  margin-top: 30px;
  font-size: 30px;
  font-weight: bold;
  color: #0077cc;
}

@media (max-width: 768px) {

  body {
    padding: 20px;
  }

  .calculator {
    grid-template-columns: 1fr;
  }

  .button-group {
    flex-direction: column;
  }

  .quote-header {
    flex-direction: column;
    gap: 20px;
  }

  .material-row {
  grid-template-columns: 1fr 90px 45px;
}

}

@media print {

  .hero,
  .inputs,
  .warning-box,
  .result-box {
    display: none;
  }

  .calculator {
    display: block;
  }

  .results {
    box-shadow: none;
    padding: 0;
  }

  .results > h2 {
    display: none;
  }

  .customer-quote {
    border: 1px solid #222;
    margin: 0;
  }

}