:root {
  --green-900: #0d2418;
  --green-800: #143824;
  --green-700: #1b4d32;
  --green-600: #246644;
  --cream: #f5ecd6;
  --cream-dim: #e8dcc4;
  --ink: #1a140c;
  --ink-soft: #3d3428;
  --orange: #d67a24;
  --orange-deep: #b35f14;
  --orange-soft: #f0c089;
  --danger: #9b2c2c;
  --ok: #2d6a45;
  --card: #1f4a33;
  --shadow: 0 8px 24px rgba(0,0,0,.28);
  --radius: 14px;
  --tap: 48px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--green-900);
  color: var(--cream);
  font-size: 18px;
  line-height: 1.4;
}

.app { min-height: 100%; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--green-800);
  border-bottom: 3px solid var(--orange);
}
.brand {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}
.brand img { width: 40px; height: 40px; border-radius: 8px; }
.brand h1 {
  margin: 0; font-size: 1.15rem; letter-spacing: .02em; white-space: nowrap;
}
.brand .sub { font-size: .75rem; color: var(--cream-dim); display: block; }

.icon-btn, .btn {
  min-height: var(--tap);
  min-width: var(--tap);
  border: 0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 650;
  padding: 10px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn {
  background: var(--green-700);
  color: var(--cream);
}
.btn-primary { background: var(--orange); color: #1a1006; }
.btn-primary:active { background: var(--orange-deep); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 2px solid var(--cream-dim);
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-ok { background: #2e7d4f; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.screen { display: none; padding: 16px 18px 40px; max-width: 1100px; width: 100%; margin: 0 auto; }
.screen.active { display: block; }

h2 { margin: 4px 0 14px; font-size: 1.6rem; }
h3 { margin: 18px 0 10px; font-size: 1.15rem; color: var(--orange-soft); }

.job-list { display: flex; flex-direction: column; gap: 12px; }
.job-card, .style-card, .panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.job-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 72px; text-align: left; width: 100%;
  border: 0; color: inherit; font: inherit; cursor: pointer;
}
.job-card strong { display: block; font-size: 1.15rem; }
.job-card .meta { font-size: .9rem; color: var(--cream-dim); }
.due-badge {
  background: var(--orange); color: #1a1006;
  font-weight: 800; font-size: .8rem;
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
}

label { display: block; font-weight: 650; font-size: .92rem; margin-bottom: 6px; }
input[type="text"], input[type="tel"], input[type="number"], textarea, select {
  width: 100%;
  min-height: var(--tap);
  border: 2px solid #2a6a48;
  background: var(--green-900);
  color: var(--cream);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1.05rem;
}
textarea { min-height: 96px; resize: vertical; }
.check {
  display: flex; align-items: center; gap: 12px;
  min-height: var(--tap);
  font-weight: 650;
}
.check input { width: 28px; height: 28px; accent-color: var(--orange); }

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.style-card { text-align: left; border: 3px solid transparent; color: inherit; font: inherit; cursor: pointer; }
.style-card.selected { border-color: var(--orange); }
.style-swatch {
  height: 72px; border-radius: 10px; margin-bottom: 10px;
}
.style-card p { margin: 6px 0 0; color: var(--cream-dim); font-size: .95rem; }

.totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}
.stat {
  background: var(--green-800);
  border-left: 5px solid var(--orange);
  padding: 12px 14px;
  border-radius: 10px;
}
.stat b { display: block; font-size: 1.35rem; }
.stat span { font-size: .85rem; color: var(--cream-dim); }

.run {
  background: var(--green-800);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
.run-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.run-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr 1.2fr .7fr;
  gap: 10px;
}
@media (max-width: 900px) {
  .run-grid { grid-template-columns: 1fr 1fr; }
}

.gate-row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin-top: 8px; }
.gate-row .grow { flex: 1; min-width: 120px; }

.price-row {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.example-tag {
  display: inline-block;
  background: var(--orange);
  color: #1a1006;
  font-size: .72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.disclaimer {
  background: #3a2a10;
  border: 2px solid var(--orange);
  color: var(--cream);
  padding: 12px 14px;
  border-radius: 10px;
  margin: 14px 0;
  font-weight: 600;
}

.fu-item {
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.fu-item.due { outline: 3px solid var(--orange); }
.fu-item.sent { opacity: .7; }
.fu-copy {
  white-space: pre-wrap;
  background: var(--green-900);
  padding: 12px;
  border-radius: 8px;
  margin: 8px 0;
  font-size: .98rem;
}

.empty { color: var(--cream-dim); padding: 20px 0; }

.footer-note {
  text-align: center;
  font-size: .8rem;
  color: #9bb8a6;
  padding: 8px 16px 20px;
}

.hidden { display: none !important; }
