:root {
  --bg: #1a2332;
  --bg2: #243044;
  --card: #2c3b52;
  --line: #3d516c;
  --text: #f3f1ea;
  --muted: #a8b4c4;
  --accent: #e8b86d;
  --good: #7dcea0;
  --warn: #e8b86d;
  --bad: #e07a6a;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, Segoe UI, sans-serif; }
button, input, textarea, select { font: inherit; }
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; padding: 12px 12px 88px; }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 16px; gap: 8px; }
.brand { font-weight: 700; letter-spacing: .02em; }
.brand span { color: var(--accent); }
.muted { color: var(--muted); font-size: .9rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.card h2, .card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.row { display: flex; gap: 8px; align-items: center; }
.grow { flex: 1; }
label { display: block; font-size: .78rem; color: var(--muted); margin: 10px 0 4px; }
input, textarea, select {
  width: 100%; background: var(--bg2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
textarea { min-height: 88px; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 10px; padding: 11px 14px; font-weight: 650; cursor: pointer;
}
.btn.primary { background: var(--accent); color: #1a2332; width: 100%; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.good { background: var(--good); color: #143022; }
.btn.full { width: 100%; }
.btn.sm { padding: 7px 10px; font-size: .85rem; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.job-title { font-weight: 650; }
.tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto;
  background: #16202e; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr);
  z-index: 20;
}
.nav button { background: none; border: 0; color: var(--muted); padding: 10px 4px 14px; font-size: .72rem; }
.nav button.on { color: var(--accent); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.photos button { padding: 0; border: 0; background: none; }
.photos img { width: 100%; height: 84px; object-fit: cover; border-radius: 8px; display: block; }
.line { display: grid; grid-template-columns: 1fr 72px 28px; gap: 6px; margin-bottom: 6px; align-items: center; }
.total { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 8px; }
.status { font-size: .75rem; padding: 3px 8px; border-radius: 999px; background: var(--bg2); }
.status.pending { color: var(--warn); }
.status.approved { color: var(--good); }
.quote-paper { background: #f7f4ee; color: #1a2332; border-radius: 12px; padding: 16px; }
.measure-stage { position: relative; background: #111; border-radius: 12px; overflow: hidden; }
.measure-stage canvas { display: block; width: 100%; height: auto; touch-action: none; }
.hint { font-size: .85rem; color: var(--accent); margin: 0 0 8px; }
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--bg2); border-radius: 10px; padding: 10px; }
.stat b { display: block; font-size: 1.15rem; }
.modes button.on { background: var(--accent); color: #1a2332; border-color: var(--accent); }
@media print {
  .nav, header.top, .no-print { display: none !important; }
  body, #app { background: #fff; color: #000; padding: 0; max-width: none; }
}
