* {
  box-sizing: border-box;
}

:root {
  --bg: #eef1f5;
  --card: #ffffff;
  --line: #d7dde6;
  --text: #111827;
  --muted: #5f6978;
  --primary: #123f6b;
  --primary-dark: #0d2f4f;
  --accent: #20c05c;
  --accent-dark: #16a34a;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.page {
  width: min(860px, calc(100% - 32px));
  margin: 28px auto 40px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: 0 10px 24px rgba(18, 63, 107, 0.06);
}

.header-panel h1 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  font-size: .82rem;
  font-weight: 700;
}

.subtext {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.4rem;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

input,
select,
textarea,
button {
  font: inherit;
}

input[type="text"],
input[type="tel"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid.two {
  grid-template-columns: 1fr 1fr;
}

.inline-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.small-note {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.secondary {
  background: #f3f6fa;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn.add {
  background: var(--accent);
  color: #fff;
  padding: 9px 14px;
}

.btn.add:hover {
  background: var(--accent-dark);
}

.btn.remove {
  background: #eef2f7;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 6px 10px;
}

.accordion-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 10px;
}

.accordion-header {
  width: 100%;
  border: 0;
  background: #f7f9fc;
  padding: 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
}

.accordion-header span:last-child {
  font-size: 1.4rem;
}

.accordion-body {
  display: none;
  padding: 0;
}

.accordion-body.open {
  display: block;
}

.item-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.item-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.item-meta small {
  color: var(--muted);
}

.selected-items.empty-state {
  color: var(--muted);
}

.selected-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.estimate-panel {
  background: var(--primary);
  color: #fff;
  text-align: center;
}

.estimate-label {
  font-size: 1.1rem;
  opacity: .95;
}

.estimate-price {
  font-size: 3rem;
  font-weight: 800;
  margin-top: 4px;
}

.estimate-details {
  margin-top: 8px;
  color: rgba(255,255,255,.9);
  line-height: 1.5;
}

.photo-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.photo-preview img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.full {
  width: 100%;
  padding-top: 13px;
  padding-bottom: 13px;
}

.helper-text {
  color: var(--muted);
  font-size: .93rem;
  margin: 8px 0 0;
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 18px, 860px);
    margin-top: 14px;
  }

  .panel {
    padding: 16px;
  }

  .form-grid.two,
  .selected-item {
    grid-template-columns: 1fr;
  }

  .estimate-price {
    font-size: 2.4rem;
  }

  .item-row {
    grid-template-columns: 1fr;
  }
}
