/* ============================================================================
   The inspector's phone, as a responsive web app (DESIGN.md §16; the prototype's FieldApp.tsx and
   Field2.tsx). An inspector signed in sees only this: one column at phone width, large titles, inset
   grouped content, targets of at least 44 pt, and a floating glass tab bar. Colours are tokens only.
   ============================================================================ */
.fx-app { min-height: 100%; background: rgb(var(--c-sunk)); }
.fx-app .toolbar { padding: 0 16px; }
.fx-main { max-width: 480px; margin: 0 auto; padding: 4px 0 112px; }

/* Navigation bar: the back button in the accent colour, a large title, a subtitle. */
.fx-nav { padding: 4px 16px 12px; }
.fx-nav .back { height: 34px; display: flex; align-items: center; margin-left: -6px; color: rgb(var(--c-brand)); font-size: 16px; text-decoration: none; }
.fx-nav .back svg.i { font-size: 26px; stroke-width: 2.2; }
.fx-nav h1 { margin: 0; font-family: var(--display); font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -.025em; color: rgb(var(--c-brandInk)); }
.fx-nav p { margin: 2px 0 0; font-size: 14px; line-height: 18px; color: rgb(var(--c-ink3)); }

/* Inset grouped content */
.fx-group { margin: 0 16px 16px; background: rgb(var(--c-paper)); border-radius: 16px; box-shadow: var(--sh-card); }
.fx-group.pad { padding: 16px; }
.fx-group.hold { background: rgb(var(--c-holdBg)); box-shadow: none; }
.fx-group.due { background: rgb(var(--c-dueBg)); box-shadow: none; }
.fx-group.ok { background: rgb(var(--c-okBg)); box-shadow: none; }
.fx-group.brand { background: var(--brand-grad); color: #fff; box-shadow: none; }
.fx-head { margin: 0 32px 6px; font-size: 13px; line-height: 16px; color: rgb(var(--c-ink3)); text-transform: uppercase; letter-spacing: .02em; }
.fx-foot { margin: -8px 32px 16px; font-size: 12px; line-height: 16px; color: rgb(var(--c-ink3)); }
.fx-note { margin: 0 24px 16px; font-size: 12px; line-height: 16px; color: rgb(var(--c-ink3)); text-align: center; }

/* Rows: 44 pt, hairlines inset 16 px, values in brand where they can be edited */
.fx-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 16px; font-size: 15px; line-height: 20px; color: rgb(var(--c-ink)); text-decoration: none; }
.fx-group > :is(.fx-row, .fx-field, .fx-area, .fx-input) + :is(.fx-row, .fx-field, .fx-area, .fx-input) { background-image: linear-gradient(rgb(var(--c-rule2)), rgb(var(--c-rule2))); background-repeat: no-repeat; background-position: 16px 0; background-size: calc(100% - 16px) 1px; }
.fx-row > .k { flex: 1; min-width: 0; }
.fx-row > .v { color: rgb(var(--c-ink3)); font-size: 15px; text-align: right; }
.fx-row > svg.i { font-size: 17px; color: rgb(var(--c-ink3)); flex: none; }
.fx-row > svg.i.lead { color: rgb(var(--c-brand)); }
a.fx-row:active, button.fx-row:active { background: rgb(var(--c-field)); }
button.fx-row { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; font-size: 15px; }
.fx-meta { display: flex; align-items: flex-start; gap: 12px; margin-top: 8px; font-size: 15px; line-height: 20px; }
.fx-meta svg.i { flex: none; font-size: 17px; margin-top: 2px; color: rgb(var(--c-brand)); }
.fx-row .sub { display: block; font-size: 12px; line-height: 15px; color: rgb(var(--c-ink3)); }

/* Fields inside a group: transparent, 44 pt, values right-aligned in brand */
.fx-field { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 16px; font-size: 15px; }
.fx-field > span { flex: 1; color: rgb(var(--c-ink)); }
.fx-field input, .fx-field select { border: 0; background: transparent; font: inherit; font-size: 15px; color: rgb(var(--c-brand)); font-weight: 500; text-align: right; outline: none; min-width: 0; }
.fx-field input[inputmode="decimal"] { width: 80px; font-variant-numeric: tabular-nums; }
.fx-field select { max-width: 62%; text-align: right; text-align-last: right; cursor: pointer; }
.fx-field .u { flex: none; width: 26px; color: rgb(var(--c-ink3)); text-align: right; }
.fx-area { display: block; width: 100%; border: 0; background: transparent; padding: 12px 16px; font: inherit; font-size: 15px; line-height: 20px; color: rgb(var(--c-ink)); resize: none; outline: none; box-sizing: border-box; }
.fx-input { display: block; width: 100%; height: 44px; border: 0; border-radius: 12px; background: rgb(var(--c-field)); padding: 0 14px; font: inherit; font-size: 15px; color: rgb(var(--c-ink)); outline: none; box-sizing: border-box; }
.fx-input:focus, .fx-area:focus, .fx-field input:focus, .fx-field select:focus { box-shadow: 0 0 0 3px rgb(var(--c-brand) / .25); border-radius: 10px; }
.fx-box { border-radius: 12px; background: rgb(var(--c-field)); }
.fx-box > * + * { background-image: linear-gradient(rgb(var(--c-rule2)), rgb(var(--c-rule2))); background-repeat: no-repeat; background-position: 14px 0; background-size: calc(100% - 14px) 1px; }
.fx-box .fx-area { padding: 12px 14px; }
.fx-box .fx-input { border-radius: 0; background-color: transparent; }

/* Buttons: full-width 50 pt primary, 44 pt inline, destructive text in hold */
.fx-big { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 16px 12px; width: calc(100% - 32px); height: 50px; border-radius: 14px; border: 0; font: inherit; font-size: 16px; font-weight: 600; background: rgb(var(--c-brand)); color: #fff; cursor: pointer; text-decoration: none; transition: transform .15s; }
.fx-big.sec { background: rgb(var(--c-brand) / .12); color: rgb(var(--c-brand)); }
.fx-big.danger { background: rgb(var(--c-hold) / .1); color: rgb(var(--c-hold)); }
.fx-big:active { transform: scale(.98); }
.fx-big:disabled { opacity: .4; cursor: not-allowed; }
.fx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 16px; border-radius: 12px; border: 0; font: inherit; font-size: 15px; font-weight: 600; background: rgb(var(--c-brand)); color: #fff; cursor: pointer; text-decoration: none; }
.fx-btn.sec { background: rgb(var(--c-brand) / .12); color: rgb(var(--c-brand)); }
.fx-btn.paper { background: rgb(var(--c-paper)); color: rgb(var(--c-brand)); }
.fx-btn.wide { width: 100%; }
.fx-btn:disabled { opacity: .4; cursor: not-allowed; }
.fx-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 999px; border: 0; font: inherit; font-size: 14px; font-weight: 500; background: rgb(var(--c-brand) / .12); color: rgb(var(--c-brand)); cursor: pointer; text-decoration: none; }
.fx-pill svg.i { font-size: 16px; }
.fx-link-hold { font-size: 14px; font-weight: 500; color: rgb(var(--c-hold)); text-decoration: none; }

/* The outcome choice: full width, tinted by the state chosen */
.fx-seg { display: flex; width: 100%; border-radius: 10px; }
.fx-seg > button { flex: 1; height: 34px !important; border-radius: 8px !important; font-size: 13px !important; padding: 0 6px !important; justify-content: center; }
.fx-seg > button.on.ok { color: rgb(var(--c-ok)); font-weight: 600; }
.fx-seg > button.on.due { color: rgb(var(--c-due)); font-weight: 600; }
.fx-seg > button.on.hold { color: rgb(var(--c-hold)); font-weight: 600; }
.fx-seg > button.on.plain { font-weight: 600; }

/* Acceptance criteria beside the entry, never behind a link */
.fx-crit { margin: 12px 0; padding: 10px 12px; border-radius: 12px; background: rgb(var(--c-infoBg)); color: rgb(var(--c-info)); font-size: 13px; line-height: 18px; white-space: pre-line; }
.fx-crit b { font-weight: 600; }

/* A job card and an activity card */
.fx-card { display: block; width: 100%; padding: 16px; border: 0; background: transparent; border-radius: 16px; text-align: left; color: inherit; text-decoration: none; font: inherit; }
.fx-card:active { background: rgb(var(--c-field)); }
.fx-card .top { display: flex; align-items: center; gap: 8px; }
.fx-card .top .id { margin-left: auto; font-size: 11px; color: rgb(var(--c-ink3)); }
.fx-card .t { display: block; margin-top: 10px; font-size: 17px; line-height: 22px; font-weight: 600; color: rgb(var(--c-ink)); }
.fx-card .m { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 13px; line-height: 18px; color: rgb(var(--c-ink3)); }
.fx-card .d { margin-top: 8px; font-size: 13px; line-height: 18px; color: rgb(var(--c-ink2)); }
.fx-card .next { margin-top: 6px; font-size: 12px; line-height: 16px; color: rgb(var(--c-ink2)); font-weight: 500; }
.fx-card .go { display: flex; align-items: center; justify-content: flex-end; margin-top: 8px; color: rgb(var(--c-brand)); font-size: 14px; }
.fx-act { padding: 16px; }
.fx-act .h { display: flex; align-items: baseline; gap: 8px; }
.fx-act .h .id { font-size: 13px; color: rgb(var(--c-ink3)); flex: none; }
.fx-act .h b { font-size: 17px; line-height: 22px; font-weight: 600; }
.fx-act .x { margin-top: 4px; font-size: 13px; line-height: 18px; color: rgb(var(--c-ink3)); }
.fx-act .ours { display: inline-flex; gap: 4px; margin-left: 4px; }

/* A locked activity: who owes it, and the call to make */
.fx-lock .h { display: flex; align-items: center; gap: 8px; color: rgb(var(--c-hold)); font-size: 16px; font-weight: 600; line-height: 21px; }
.fx-lock p { margin: 6px 0 0; font-size: 14px; line-height: 19px; color: rgb(var(--c-hold)); }
.fx-lock p.k { color: rgb(var(--c-ink2)); font-size: 13px; margin-bottom: 12px; }

/* Refusal on the phone: a hold group with a bold red title and the list */
.fx-refusal { padding: 16px; }
.fx-refusal b.t { display: block; color: rgb(var(--c-hold)); font-size: 16px; line-height: 21px; font-weight: 600; }
.fx-refusal ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; line-height: 18px; }
.fx-refusal li + li { margin-top: 4px; }
.fx-refusal li::marker { color: rgb(var(--c-hold)); }
.fx-refusal p { margin: 6px 0 0; font-size: 13px; line-height: 18px; }

/* Results and photographs recorded on an activity */
.fx-res { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; font-size: 13px; line-height: 18px; }
.fx-res + .fx-res { border-top: 1px solid rgb(var(--c-rule2)); }
.fx-res .w { flex: 1; min-width: 0; color: rgb(var(--c-ink2)); }
.fx-res .w b { color: rgb(var(--c-ink)); font-weight: 500; }
.fx-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fx-photo { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; display: grid; align-content: end; background: linear-gradient(145deg, rgb(var(--c-ink3) / .35), rgb(var(--c-ink2) / .55)); color: #fff; font-size: 9px; line-height: 11px; font-weight: 500; }
.fx-photo span { padding: 0 6px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-photo.old { opacity: .5; }
.fx-take { width: 64px; height: 64px; border-radius: 10px; border: 0; display: grid; place-items: center; background: rgb(var(--c-brand) / .12); color: rgb(var(--c-brand)); cursor: pointer; }
.fx-take svg.i { font-size: 22px; }

/* Progress */
.fx-prog { margin: 0 16px 16px; }
.fx-prog .l { display: flex; font-size: 13px; color: rgb(var(--c-ink3)); margin-bottom: 6px; }
.fx-prog .l .id { margin-left: auto; font-size: 11px; }
.fx-prog .bar { height: 6px; border-radius: 999px; background: rgb(var(--c-ink) / .08); overflow: hidden; }
.fx-prog .bar i { display: block; height: 100%; border-radius: 999px; background: rgb(var(--c-brand)); transition: width .3s; }

/* What a day is worth, as typed */
.fx-worth .lb { font-size: 13px; color: rgb(255 255 255 / .75); }
.fx-worth .n { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.fx-worth .n b { font-family: var(--display); font-size: 30px; line-height: 1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fx-worth .n span { font-size: 16px; font-weight: 600; }
.fx-worth .w { margin-top: 6px; font-size: 13px; color: rgb(var(--c-onDarkDue)); font-weight: 500; }

/* The floating glass tab bar */
.fx-tabs { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; gap: 4px; padding: 4px; border-radius: 999px; }
.fx-tabs a { position: relative; width: 86px; height: 52px; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 500; color: rgb(var(--c-ink2)); text-decoration: none; }
.fx-tabs a svg.i { font-size: 21px; }
.fx-tabs a.on { background: rgb(var(--c-ink) / .08); color: rgb(var(--c-brand)); }
.fx-tabs a .badge { position: absolute; top: 4px; right: 20px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: rgb(var(--c-hold)); color: #fff; font-size: 10.5px; font-weight: 600; display: grid; place-items: center; }

/* Office pages an inspector also opens (the job pack): the phone's 16 px gutter, and the title block in two columns. */
.fx-main > :is(.tblock, .phead, .panel, .okbox, .warnbox, .refusal, .vetgrid) { margin-left: 16px; margin-right: 16px; }
.fx-main .tblock { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.fx-main .phead { flex-wrap: wrap; gap: 10px; }

/* The searchable dropdown in a field row (UI standards 1 and 7): the row's label on the left, the choice on the right, as
   the native select it replaced. The open list is the same as everywhere. */
.fx-field .picker { flex: 0 1 62%; width: auto; min-width: 120px; }
.fx-field .picker .pick-in { height: 40px; padding: 0 22px 0 0; border: 0; box-shadow: none; background: transparent; text-align: right;
  color: rgb(var(--c-brand)); font-weight: 500; font-size: 15px; }
.fx-field .picker .pick-cv { display: none; }
.fx-field .picker[style*="--pick-cvn"] .pick-in { padding-left: 0; }
.fx-field .picker .pick-caret { right: 0; }
.fx-field .picker .pick-x { right: 18px; }
.fx-field .picker .pick-in:focus { box-shadow: 0 0 0 3px rgb(var(--c-brand) / .25); border-radius: 10px; }

/* What the inspector owes before sending results (project lead, 29 October 2026): a strip under the bar, in the flow of
   the page (never over the job's action bar), opening the instructions to acknowledge. */
.fx-owed { display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); max-width: 448px; margin: 10px auto 4px; padding: 10px 12px;
  border: 0; border-radius: 12px; background: rgb(var(--c-dueBg)); color: rgb(var(--c-ink)); font: inherit; font-size: 13.5px; line-height: 18px; text-align: left; cursor: pointer; }
.fx-owed > svg.i:first-child { color: rgb(var(--c-due)); font-size: 18px; flex: none; }
.fx-owed > span { flex: 1; min-width: 0; font-weight: 500; }
.fx-owed > svg.i:last-child { color: rgb(var(--c-ink3)); flex: none; }
.fx-refusal .instr-blockers li { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.fx-returned b { color: rgb(var(--c-hold)); }
.fx-returned p { margin: 4px 0 0; font-size: 13px; line-height: 18px; }
