:root {
  --icc-red: #a3272c;
  --bg: #f7f6f4;
  --card-bg: #ffffff;
  --border: #e2e0dc;
  --text: #1c1c1c;
  --text-muted: #6b6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  padding: 2.5rem 1.5rem 1.5rem;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.card h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

form {
  display: grid;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.field input[type="text"],
.field input[type="number"] {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
}

.checkbox-field label {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

button[type="submit"] {
  margin-top: 0.25rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 6px;
  background: var(--icc-red);
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

button[type="submit"]:hover {
  opacity: 0.92;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.price-tile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: 8px;
  text-align: center;
}

.price-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.price-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--icc-red);
}

.breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  color: var(--text-muted);
  font-weight: 500;
}

#history-table {
  display: block;
  overflow-x: auto;
}
