/* field.css — layered over app.css for the field app.
   Used on a phone, in a damaged house, often with gloves on and bad light.
   So: bigger targets, fewer keystrokes, state always visible. */

body.field { font-size: 16px; }

.field main { max-width: 680px; padding-bottom: 96px; }

/* Status strip — never hidden, because knowing you are offline matters more
   than anything else on the screen. */
.statusbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 9px 20px; font-size: 14px;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.statusbar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.statusbar.off .dot { background: var(--bad); }
.statusbar.off { background: var(--bad-soft); color: var(--bad); }
.statusbar .spacer { margin-left: auto; }

/* Big primary actions. */
.field button, .field .btn { font-size: 16px; padding: 13px 18px; }
.field button.sm { font-size: 14px; padding: 7px 12px; }
.bigbtn {
  display: block; width: 100%; text-align: center;
  font-size: 17px; font-weight: 600; padding: 17px;
  background: var(--brand); color: var(--brand-ink);
  border: 0; border-radius: var(--radius); cursor: pointer;
}
.bigbtn:disabled { background: var(--mute-soft); color: var(--ink-3); }

.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
  display: flex; gap: 10px;
}
.actionbar > * { flex: 1; }

/* Chip pickers instead of dropdowns — one tap, no keyboard. */
.picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px; }
.picker button {
  font-size: 15px; padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.picker button[aria-pressed="true"] {
  background: var(--brand); border-color: var(--brand); color: var(--brand-ink);
}

.field label { display: block; font-size: 13px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 2px; font-weight: 600; }
.field input[type=text], .field textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.field textarea { min-height: 76px; resize: vertical; }

/* Photos */
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photos img, .photos .shot {
  width: 78px; height: 78px; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
}
.photo-add {
  width: 78px; height: 78px; border: 1px dashed var(--line);
  border-radius: var(--radius); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--ink-3); cursor: pointer;
}

/* The item list, grouped by room. */
.room-head {
  display: flex; align-items: baseline; gap: 8px;
  margin: 22px 0 8px; font-size: 15px; font-weight: 600;
}
.room-head .count { font-weight: 400; color: var(--ink-3); font-size: 13px; }

.itemrow {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px;
  border-bottom: 1px solid var(--line-2);
}
.itemrow:last-child { border-bottom: 0; }
.itemrow .no { font-family: var(--mono); font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.itemrow .desc { flex: 1; }
.itemrow .thumb { width: 44px; height: 44px; border-radius: 5px; object-fit: cover; }

.pending { color: var(--warn); font-size: 12px; font-weight: 600; }
.synced  { color: var(--ok);   font-size: 12px; font-weight: 600; }

.warn-card {
  background: var(--warn-soft); color: var(--warn);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 15px; font-size: 14px; margin-bottom: 14px;
}
.bad-card {
  background: var(--bad-soft); color: var(--bad);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 15px; font-size: 14px; margin-bottom: 14px;
}

/* The curtain and blind job card. Only shown once the item is a window
   furnishing — a garment never sees it. */
.jobcard {
  margin: 1.25rem 0;
  padding: 0 0 .25rem;
  border-top: 2px solid var(--line-2);
}
.jobcard h2 {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-3); margin: 1rem 0 .25rem;
}
.measure-row { display: flex; gap: .5rem; }
.measure-row > label {
  flex: 1; display: block;
  font-size: .78rem; text-transform: none; letter-spacing: 0; color: var(--ink-2);
}
.measure-row input { width: 100%; margin-top: .2rem; }
.derived {
  font-family: var(--mono); font-size: .9rem; color: var(--ink-2);
  padding: .5rem .6rem; margin: .5rem 0 0;
  background: var(--surface-2); border-radius: 8px;
}
.derived strong { color: var(--ink); font-size: 1rem; }
.picker.toggles button[aria-pressed="true"]::before { content: "✓ "; }

/* The driveway. Four numbers, big enough to read at arm's length in the rain,
   because that is where this screen is used and a phone held at arm's length
   is the normal posture when somebody else is counting with you. */
.counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
/* On a phone the labels will not fit four across — "Items unaccounted" pushed
   the last tile off the screen. Two by two, and the numbers stay big. */
@media (max-width: 480px) { .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.counts .count {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 10px; text-align: center;
}
.counts .count .v { font-size: 30px; font-weight: 650; line-height: 1.1; }
.counts .count .k { font-size: 11px; color: var(--ink-3); text-transform: uppercase;
                    letter-spacing: .04em; margin-top: 4px; }
.counts .count.bad { border-color: var(--bad); background: var(--bad-soft); }
.counts .count.bad .v { color: var(--bad); }

/* Count by category. Steppers big enough for a gloved thumb; the number in the
   middle can be typed when the count is already known. */
.countrow { display: grid; grid-template-columns: minmax(0, 1fr) auto 5.2em auto;
  align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.countrow:last-child { border-bottom: 0; }
.countrow .desc { min-width: 0; }
.field .countrow .step { width: 48px; height: 48px; padding: 0; font-size: 24px; line-height: 1;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.countrow .tallyin { width: 100%; text-align: center; font: inherit; font-size: 20px; font-weight: 650;
  padding: 10px 4px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font-variant-numeric: tabular-nums; }
.tallytotal { align-self: center; font-size: 15px; color: var(--ink-2); flex: 0 1 auto; }
.tallytotal strong { font-size: 20px; color: var(--ink); }

/* The visit header on the count screen. */
.headcard { padding: 4px 14px 14px; }
.headcard .kvline { padding-top: 10px; font-size: 15px; }
.headnums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.headnums label { margin: 10px 0 0; font-size: 11px; }
.headnums input { width: 100%; font: inherit; font-size: 18px; padding: 10px 8px; margin-top: 4px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
