@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #f5f4f1;
  --surface: #ffffff;
  --surface2: #f0eee9;
  --border: #e2dfd8;
  --border2: #c8c4bc;
  --text: #1a1916;
  --text2: #6b6760;
  --text3: #9e9b95;
  --accent: #37abbf;
  --accent-bg: #e8f7fa;
  /* Deeper accent for the rare surface that carries WHITE text on teal (the
     sign-up header band). --accent is tuned for teal-on-white and is too light
     to read white type against. Not a second brand teal — only for filled
     accent surfaces. */
  --accent-deep: #1f8a9b;
  --green: #2d6a4f;
  --green-bg: #e8f3ed;
  --amber: #92600a;
  --amber-bg: #fef3dc;
  --red: #8b1a1a;
  --red-bg: #fdeaea;
  --blue: #0e6774;
  --blue-bg: #e5f4f6;
  --blue-mid: #0f7483;
  --font: "DM Sans", sans-serif;
  --mono: "DM Mono", monospace;
  --r: 10px;
  --r-sm: 6px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  color: var(--text);
  font-family: var(--font);
  background: var(--bg);
}

.nativeIos {
  --safe-area-top: max(env(safe-area-inset-top, 0px), 44px);
}

/* Android (Capacitor 8) runs the webview edge-to-edge: content draws under the
   status bar and nav bar, but Android WebView often reports env(safe-area-inset-*)
   as 0. Provide sensible floors so the header clears the status bar and the
   fixed New-Job button clears the navigation bar. */
.nativeAndroid {
  --safe-area-top: max(env(safe-area-inset-top, 0px), 24px);
  --safe-area-bottom: max(env(safe-area-inset-bottom, 0px), 24px);
}

/* CONVENTION: any element flush to the bottom of a scroll view or the screen
   must fold var(--safe-area-bottom) into its bottom padding/offset — never a
   bare px — so it clears the Android nav/gesture bar on every device.
   See .scrollBody / .fab / .sheet / .detailBody / #toastContainer. */

html {
  touch-action: pan-x pan-y;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  flex: 0 0 auto;
}

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

input,
select,
textarea {
  font-size: 16px;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.appShell {
  min-height: 100vh;
  background: var(--bg);
}

.view {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  /* iOS webviews can sit under the status bar; keep headers below the safe area. */
  padding-top: var(--safe-area-top);
  background: var(--bg);
  transition:
    transform 280ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 280ms ease;
}

.view.hidden {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

.view.slideLeft {
  transform: translateX(-8%);
  opacity: 0.58;
  pointer-events: none;
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex: 0 0 auto;
}

.headerInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: 720px;
}

.logo {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  gap: 10px;
}

.logoImg {
  display: block;
  width: 196px;
  height: 42px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}

.logoVersion {
  padding: 3px 8px;
  border: 1px solid #c8e6ec;
  border-radius: 999px;
  background: var(--blue-bg);
  color: var(--blue-mid);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.headerActions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

/* S-21 — quiet save-state footer (moved out of the header). Fixed at the bottom,
   above the sliding views and the .fab. pointer-events:none on the bar so it
   never blocks taps or fights the centered .fab; only the text/link is tappable.
   Left-aligned to clear the centered fab. Muted by default; calm amber (never
   red) when writes are parked. */
.appFooter {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 16px calc(var(--safe-area-bottom) + 4px);
  pointer-events: none;
}

.sync-state {
  pointer-events: auto;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text3);
  letter-spacing: 0.01em;
}

.sync-state.sync-state--attention {
  color: var(--amber);
}

.sync-retry {
  pointer-events: auto;
  border: 0;
  margin: 0;
  padding: 0 0 0 3px;
  background: none;
  font: inherit;
  color: var(--amber);
  text-decoration: underline;
  cursor: pointer;
}

.sync-retry:hover {
  color: var(--text);
}

.sync-clear {
  pointer-events: auto;
  border: 0;
  margin: 0;
  padding: 0 0 0 3px;
  background: none;
  font: inherit;
  color: var(--text3);
  text-decoration: underline;
  cursor: pointer;
}

.sync-clear:hover {
  color: var(--text);
}

.sourcePath {
  min-width: 0;
  max-width: min(210px, 22vw);
  overflow: hidden;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text2);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sourcePath.warning {
  border-color: #f0c46d;
  background: var(--amber-bg);
  color: var(--amber);
}

.scrollBody {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 30px 24px calc(118px + var(--safe-area-bottom));
  scrollbar-width: none;
}

.scrollBody::-webkit-scrollbar,
.sheet::-webkit-scrollbar {
  width: 0;
}

.pageHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.pageHeader h1 {
  font-size: 28px;
  letter-spacing: 0;
}

.pageHeader p,
.mutedText,
.panelHeader > div > span {
  color: var(--text3);
  font-size: 12px;
}

.iconButton,
.backButton,
.sheetClose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: inherit;
}

.iconButton {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
}

.iconButton.secondary {
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text);
}

.jobList {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.jobCard {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  color: var(--text);
  text-align: left;
  transition:
    border-color 150ms ease,
  box-shadow 150ms ease,
    transform 150ms ease;
}

.jobCard:has(.jobSelect:hover),
.jobCard.selected {
  transform: translateY(-1px);
  border-color: var(--border2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.jobStripe.upcoming {
  background: var(--blue);
}

.jobStripe.poured {
  background: var(--green);
}

.jobSelect {
  display: grid;
  gap: 13px;
  min-width: 0;
  min-height: 132px;
  padding: 22px 24px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.jobContent {
  min-width: 0;
}

.jobTop,
.jobFooter,
.panelHeader,
.sensorActions,
.chipRow {
  display: flex;
  align-items: center;
}

.jobTop {
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.jobTop > span {
  min-width: 0;
}

.jobTop strong {
  display: block;
  overflow: hidden;
  font-size: 17px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jobAddress {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  color: var(--text2);
  font-size: 15px;
  line-height: 1.35;
}

.jobAddress svg {
  width: 15px;
  height: 15px;
}

.jobFooter {
  gap: 10px;
  flex-wrap: wrap;
}

.chip,
.statusPill,
.ratioPill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.chip,
.ratioPill {
  padding: 4px 9px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
}

.chip.watch {
  gap: 4px;
  border-color: transparent;
  background: var(--amber-bg);
  color: var(--amber);
  font-weight: 800;
}
.chip.watch svg { width: 12px; height: 12px; }

.statusPill {
  flex: 0 0 auto;
  gap: 5px;
  padding: 4px 9px;
  text-transform: capitalize;
}

.statusPill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.statusPill.upcoming {
  background: var(--blue-bg);
  color: var(--blue);
}

.statusPill.poured {
  background: var(--green-bg);
  color: var(--green);
}

.statusPill.needsMix {
  background: var(--amber-bg);
  color: var(--amber);
  text-transform: none;
}

.detailHeaderPills {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
}

.fab {
  position: fixed;
  bottom: calc(var(--safe-area-bottom) + 28px);
  left: 50%;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px 28px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 4px 20px rgba(55, 171, 191, 0.36);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.fab:hover {
  transform: translateX(-50%) translateY(-1px);
  background: #258ea0;
}

.detailHeader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 68px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex: 0 0 auto;
}

.backButton {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--blue-mid);
}

.backButton svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.3;
}

.backButton:hover {
  background: var(--blue-bg);
  color: var(--blue);
}

.detailLeft {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 12px;
  min-width: 0;
}

.detailLogoImg {
  display: block;
  width: min(145px, 28vw);
  height: 32px;
  flex: 0 1 auto;
  object-fit: contain;
  object-position: left center;
}

.detailBody {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: max-content;
  gap: 28px;
  padding-top: 76px;
  padding-bottom: calc(36px + var(--safe-area-bottom));
}

.detailBody > * {
  min-width: 0;
}

.addressSubhead {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.35;
  flex-wrap: wrap;
}

.addressSubhead svg {
  width: 14px;
  height: 14px;
}

.dotSep {
  color: var(--text3);
}

.panel,
.metric,
.sensorMetaItem {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.panel {
  min-width: 0;
  padding: 16px;
}

.detailBody > .panel:not(.overviewPanel) {
  box-shadow: none;
}

.panel.collapsed {
  padding-block: 16px;
}

.panel.collapsed > :not(.panelHeader) {
  display: none;
}

.panel.collapsed .panelHeader {
  margin-bottom: 0;
}

.sensorPanel.collapsed .sensorHint {
  display: none;
}

.panelHeader {
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.panelHeader h3 {
  margin-top: 2px;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.2;
}

.panelHeader > div > span {
  display: block;
  max-width: 560px;
  margin-top: 3px;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.35;
}

.panelHeader > svg {
  width: 22px;
  height: 22px;
}

.panelActions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.panelActions > svg {
  width: 22px;
  height: 22px;
  color: var(--blue-mid);
}

.sectionToggle {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--blue-mid);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.sectionToggle:hover {
  border-color: var(--blue-mid);
  background: var(--blue-soft);
}

.sectionToggleChevron {
  display: block;
  transition: transform 0.2s ease;
  transform: rotate(0deg);
}

.sectionToggle--open .sectionToggleChevron {
  transform: rotate(90deg);
}

.sectionToggle--small {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  font-size: 12px;
  border-color: var(--border);
  color: var(--text3);
}

.overviewPanel {
  padding: 24px 20px 26px;
  border-top: 4px solid var(--accent);
  box-shadow: 0 8px 24px rgba(38, 31, 23, 0.08);
}

.overviewPanel .panelHeader {
  margin-bottom: 18px;
}

.overviewPanel .panelHeader h3 {
  font-size: 17px;
  line-height: 1.2;
}

/* Mix design "required before pour" state — the one setup step that gates readings.
   Amber promotion modeled on .overviewPanel, using the app's watch/warning tokens. */
.mixPanel.mixRequired {
  border-top: 4px solid var(--amber);
  background: var(--amber-bg);
  box-shadow: 0 8px 24px rgba(38, 31, 23, 0.08);
}
.mixRequiredEyebrow {
  color: var(--amber);
  font-weight: 800;
}
.mixSetBadge {
  margin-left: 8px;
  vertical-align: middle;
  font-size: 12px;
}
.overviewItem .mixNotSet {
  color: var(--amber);
}
.optionalTag {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text3);
}

.sensorPanel,
.mixPanel,
.recommendation,
.updatesPanel {
  border-color: #e8e4dc;
}

.eyebrow,
.sectionTitle,
.fieldTitle {
  color: var(--blue-mid);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Collapsible "Oven moisture test" dropdown (log-mix lab-calibration form). */
.ovenBlock > .ovenSummary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ovenBlock > .ovenSummary::-webkit-details-marker { display: none; }
.ovenBlock > .ovenSummary::after {
  content: "›";
  margin-left: auto;
  color: var(--text3);
  font-weight: 700;
  transition: transform 0.2s ease;
}
.ovenBlock[open] > .ovenSummary::after { transform: rotate(90deg); }

/* Collapsible "Advanced" dropdown (log-mix lab-calibration form + nested absorption disclosures). */
.advancedBlock > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.advancedBlock > summary::-webkit-details-marker { display: none; }
.advancedBlock > summary::after {
  content: "›";
  margin-left: auto;
  color: var(--text3);
  font-weight: 700;
  transition: transform 0.2s ease;
}
.advancedBlock[open] > summary::after { transform: rotate(90deg); }

.sensorPanel {
  border-style: dashed;
}

.sensorPanel:not(.collapsed) {
  min-height: 300px;
  padding: 18px;
}

.mixPanel:not(.collapsed) {
  padding: 18px;
}

.sensorPanel.connected {
  border-style: solid;
  border-color: #9ed8e1;
  background: var(--accent-bg);
}

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

.sensorTitle span {
  color: inherit;
  font-size: inherit;
}

.sensorStatusDot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #b8b0a7;
  box-shadow: 0 0 0 3px rgba(184, 176, 167, 0.18);
}

.sensorStatusDot.connected {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(55, 171, 191, 0.18);
}

.sensorStatusDot.pending {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(154, 98, 19, 0.16);
}

.sensorStatusDot.offline {
  background: var(--text3);
}

.sensorStatusDot.info {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(14, 103, 116, 0.18);
}

.sensorStatusDot.critical {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(139, 26, 26, 0.18);
}

.sensorHint {
  display: block;
  max-width: 680px;
  margin-top: 4px;
  line-height: 1.35;
}

.sensorHint.warning {
  color: var(--red);
  font-weight: 700;
}

.sensorWeatherCard {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.sensorWeatherCard.watch {
  border-color: #d9c993;
  background: #fffaf0;
}

.sensorWeatherCard.warning,
.sensorWeatherCard.critical {
  border-color: #efb15c;
  background: #fff5e7;
}

.sensorWeatherCard.ok {
  border-color: #9ed8e1;
  background: var(--accent-bg);
}

.wBar {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.wBarHeader {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.wBarPhaseLabel {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
}

.wBarUpdated {
  font-size: 10px;
  color: var(--text3);
  flex-shrink: 0;
}

.wBarOuter {
  position: relative;
  padding: 4px 0;
}

.wBarTrack {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: rgba(0,0,0,0.08);
  overflow: hidden;
}
.wBarTrack--solid {
  background: var(--accent);
  opacity: 0.75;
}

.wBarSeg {
  position: absolute;
  top: 0;
  height: 100%;
}
.wBarSeg--ok      { background: var(--green, #2a9d5c); opacity: 0.75; }
.wBarSeg--watch   { background: #e07b2a; opacity: 0.75; }
.wBarSeg--warning { background: #d9534f; opacity: 0.85; }
.wBarSeg--neutral { background: rgba(0,0,0,0.12); }

.wBarInnerTick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--surface);
  opacity: 0.7;
  z-index: 1;
}

.wBarPhaseBlock {
  position: absolute;
  top: 0;
  height: 100%;
}
.wBarPhaseBlock--hourly { background: rgba(0,0,0,0.05); border-radius: 99px 0 0 99px; }
.wBarPhaseBlock--daily  { background: rgba(0,0,0,0.02); border-radius: 0 99px 99px 0; }

.wBarPhaseDivider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(0,0,0,0.18);
  z-index: 1;
}

.wBarDot {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
}
.wBarDot--done     { background: var(--accent); }
.wBarDot--past     { background: var(--text3); }
.wBarDot--upcoming { background: var(--surface); border: 1.5px solid var(--text3); }

.wBarCursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  border-radius: 1px;
  z-index: 4;
  transform: translateX(-50%);
  pointer-events: none;
}

.wBarLabels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text3);
  font-family: var(--mono);
  padding: 0 1px;
}

.wBarLabels--curing {
  position: relative;
  height: 14px;
}
.wBarLabels--curing span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text3);
  font-family: var(--mono);
  white-space: nowrap;
}
.wBarLabels--curing span:first-child { transform: none; }
.wBarLabels--curing span[style*="right:0"] { transform: none; }

.wBarPhaseAnnotations {
  position: relative;
  height: 13px;
}
.wBarPhaseAnnotations span {
  position: absolute;
  font-size: 9px;
  color: var(--text3);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sensorRecommendationCard {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.sensorRecommendationCard.ok {
  border-color: #9ed8e1;
  background: var(--accent-bg);
}

.sensorRecommendationCard.watch {
  border-color: #d9c993;
  background: #fffaf0;
}

.sensorRecommendationCard.warning,
.sensorRecommendationCard.critical {
  border-color: #efb15c;
  background: #fff5e7;
}

.sensorRecommendationHead {
  display: grid;
  gap: 4px;
}

.sensorRecommendationHead strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.3;
}

.sensorRecommendationHead span {
  display: block;
  margin-top: 3px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.35;
}

.sensorRecommendationTiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sensorRecommendationTile {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.sensorRecommendationTile span {
  display: block;
  color: var(--text3);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.sensorRecommendationTile strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.25;
}

.sensorRecommendationDetails {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.sensorRecommendationDetails summary {
  width: fit-content;
  color: var(--blue-mid);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style-position: inside;
}

.sensorRecommendationBody {
  display: grid;
  gap: 7px;
  padding-top: 8px;
}

.sensorRecommendationGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.sensorRecommendationGrid.compact {
  gap: 8px;
}

.sensorRecommendationGrid h4 {
  margin-bottom: 8px;
  font-size: 13px;
}

.sensorWeatherIcon {
  display: inline-grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--blue-mid);
}

.sensorWeatherCard.warning .sensorWeatherIcon,
.sensorWeatherCard.critical .sensorWeatherIcon {
  color: #9d5b00;
}

.sensorWeatherIcon svg {
  width: 18px;
  height: 18px;
}

.sensorWeatherCard span:not(.sensorWeatherIcon) {
  display: block;
  margin-top: 2px;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.35;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-width: 170px;
  overflow: hidden;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.segmented button {
  min-height: 30px;
  padding: 6px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text2);
  font-size: 12px;
  font-weight: 800;
}

.segmented button.active {
  background: var(--text);
  color: white;
}

.sensorActions {
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.2;
}

.btn.primary {
  background: var(--accent);
  color: white;
}

.btn.primary:hover {
  background: #258ea0;
}

.btn.outline {
  border-color: var(--border2);
  background: var(--surface);
  color: var(--text);
}

.btn.danger {
  border-color: #efb0a8;
  background: var(--red-bg);
  color: var(--red);
}

.btn.danger:hover {
  border-color: var(--red);
  background: #f8d9d9;
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.fullWidth {
  width: 100%;
}

.simBadge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 20px;
  background: #fff4cc;
  border: 1px solid #e8d88a;
  color: #7a6010;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.sensorConfigRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

.sensorConfigLabel {
  font-size: 12px;
  font-weight: 500;
}

.sensorConfigLabel.ok { color: var(--green, #2a9d5c); }
.sensorConfigLabel.watch { color: var(--text3); }
.sensorConfigLabel.warning { color: var(--orange, #e07b2a); }

.sensorConfigSyncBtn {
  flex-shrink: 0;
  font-size: 12px;
  padding: 4px 12px;
  border-color: var(--border);
  color: var(--text2);
}

.jobSetupFields {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.deviceThresholdsActions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.thresholdLinkedBadge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--surface2, #f0f0f0);
}
.thresholdLinkedBadge svg { width: 11px; height: 11px; }
.thresholdLinkedBadge.ok  { color: var(--green, #2a9d5c); background: color-mix(in srgb, var(--green, #2a9d5c) 12%, transparent); }
.thresholdLinkedBadge.watch { color: var(--text3); }

.thresholdSummary {
  font-size: 12px;
  color: var(--text2);
  margin: 4px 0 0;
  line-height: 1.4;
}

.thresholdGrid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.thresholdRow {
  display: flex;
  align-items: center;
  gap: 6px;
}

.thresholdLabel {
  font-size: 12px;
  color: var(--text3);
  width: 90px;
  flex-shrink: 0;
}

.thresholdInput {
  width: 52px;
  padding: 4px 6px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text1);
  text-align: center;
}

.thresholdSep {
  font-size: 12px;
  color: var(--text3);
}

.jobSetupLengthRow {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 4px;
}

.jobSetupLengthRow label {
  flex: 0 0 auto;
  min-width: 140px;
}

.jobSetupFtPerMix {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 8px;
}

.inputWithUnit {
  display: flex;
  align-items: center;
  gap: 0;
}

.inputWithUnit input {
  border-radius: 6px 0 0 6px;
  flex: 1;
  min-width: 0;
}

.inputUnit {
  background: var(--surface2, var(--border));
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 6px 6px 0;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  height: 38px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.jobSetupMixSection {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.jobSetupColorsSection {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.sealerApplyRowDivided {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.sealerSection {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.sealerSectionHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

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

.sealerCoatRow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
}

.sealerCoatLabel {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text2);
}

.sealerCoatTime {
  flex: 1;
  font-size: 13px;
  padding: 4px 8px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text1);
}

.sealerCoatRemove {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.sensorSealerApplied {
  flex: 1;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

.sealerApplyRow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.sealerTimingHint {
  font-size: 11px;
  color: var(--text3);
}

.sealerTimingHint--ready {
  color: var(--green, #2a9d5c);
  font-weight: 600;
}

.sealerTimingHint--late {
  color: var(--text3);
}

.workabilityRatingGrid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
}

.workabilityRatingBtn {
  aspect-ratio: 1;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface2, var(--surface));
  color: var(--text2);
  padding: 0;
  cursor: pointer;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}

.workabilityRatingBtn.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.weatherStatusChip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text3);
}

.sensorReadingsHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sensorReadingLayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(158px, 198px);
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.sensorReadingLayout[hidden] {
  display: none;
}

.metricGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.sensorPrimaryMetrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 10px;
}

.metric svg {
  width: 18px;
  height: 18px;
  color: var(--blue-mid);
}

.metric span,
.metric label {
  color: var(--text3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric strong {
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.25;
}

.metric label {
  display: block;
}

.sensorMetaRail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.sensorObservations {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.sensorObservationsHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sensorObservations .fieldTitle {
  margin-bottom: 8px;
}

.sensorObservations .profileFormGrid {
  gap: 10px;
}

.sensorMetaItem {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
  padding: 8px;
}

.sensorMetaItem svg {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--blue-mid);
}

.sensorMetaItem span,
.sensorMetaItem label {
  display: block;
  margin-bottom: 2px;
  color: var(--text3);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.sensorMetaItem strong {
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.25;
}

.mixPourControl input {
  width: 100%;
  min-width: 0;
  min-height: 31px;
  padding: 5px 7px;
  font-family: var(--mono);
  font-size: 12px;
}

.sensorMetaItem.mixPourControl input {
  min-height: 28px;
  padding: 4px 5px;
  font-size: 11px;
}

.mixPourControl.disabled {
  opacity: 0.72;
}

.mixDaySummary {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.mixDayTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mixDayTop strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.mixDayTop span {
  color: var(--text2);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.mixDayList {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.mixDayRow {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  overflow: hidden;
}

.mixDayRow.active {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.mixDayRowTop {
  display: flex;
  align-items: center;
}

.mixDayRowHeader {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.mixRowChevron {
  position: absolute;
  top: 10px;
  right: 11px;
  font-size: 16px;
  color: var(--text3);
  line-height: 1;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.mixRowChevron--open {
  transform: rotate(90deg);
}

.mixDayRowHeader:hover {
  background: rgba(0,0,0,0.03);
}

.mixSelectIndicator {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border2);
  border-radius: 50%;
  flex-shrink: 0;
}

.mixDayRow.active .mixSelectIndicator {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--accent-bg);
}

.mixDayName {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.mixDayName strong {
  font-size: 13px;
  line-height: 1.2;
}

.mixDayName span {
  color: var(--text2);
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 700;
}

.mixDayNotePreview {
  color: var(--text3) !important;
  font-size: 11px !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mixUnreadWater {
  color: var(--amber) !important;
  font-size: 11px !important;
  font-family: var(--mono) !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.mixBatchNameInput {
  flex: 0 1 110px;
  min-width: 0;
  margin-left: 4px;
  align-self: center;
  border: none;
  border-bottom: 1px dashed var(--border2);
  background: transparent;
  color: var(--text2);
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 700;
  padding: 0 0 1px;
}

.mixBatchNameInput:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.mixBatchName {
  color: var(--text2);
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 700;
}

.mixDayStat {
  color: var(--text2);
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 700;
  white-space: nowrap;
}

.mixDayRow.active .mixDayName strong {
  color: var(--blue-mid);
}

.mixDayExpanded {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
  border-top: 1px solid var(--accent);
}

.mixDayObservations {
  padding: 12px;
  border-top: 1px solid var(--accent);
  overflow: hidden;
}

.mixDayObservations .fieldNote {
  font-size: 10px;
}

.mixDayObservations .tierToggle {
  gap: 4px;
}

.mixDayObservations .tierOpt span {
  font-size: 12px;
  padding: 6px 10px;
}

.mixDayObservations input[type="text"],
.mixDayObservations input:not([type]) {
  font-size: 13px;
  padding: 7px 9px;
}

.loadSizeRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.loadSizeChips {
  display: flex;
  gap: 6px;
}

.loadSizeChip {
  padding: 5px 12px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
}

.loadSizeChip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accentSurface, rgba(0,170,170,0.08));
  font-weight: 600;
}

.workabilityRatingCol {
  margin-bottom: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.workabilityStepper {
  display: flex;
  align-items: center;
  gap: 0;
}

.workabilityStepBtn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text1);
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  flex-shrink: 0;
}

.workabilityStepBtn:disabled {
  opacity: 0.3;
  cursor: default;
}

.workabilityStepValue {
  flex: 1;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text1);
  line-height: 1;
}

.workabilityRatingSaved {
  display: block;
  min-height: 16px;
  font-size: 11px;
  text-align: center;
  margin-top: 4px;
  font-weight: 600;
  transition: opacity 0.3s;
}
.workabilityRatingSaved--ok { color: #4caf50; }
.workabilityRatingSaved--err { color: #e53935; }

.mixObsToggleBtn {
  flex-shrink: 0;
  align-self: flex-start;
  width: 26px;
  height: 26px;
  margin: 10px 10px 0 0;
  border: none;
  background: rgba(0,0,0,0.07);
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mixDeleteBtn {
  flex-shrink: 0;
  align-self: flex-start;
  width: 26px;
  height: 26px;
  margin: 10px 8px 0 0;
  border: none;
  background: none;
  border-radius: 50%;
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}
.mixDeleteBtn:hover, .mixDeleteBtn:active {
  color: var(--danger, #d32f2f);
  opacity: 1;
  background: rgba(211,47,47,0.08);
}
.mixDeleteBtn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mixDeleteConfirm {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(211,47,47,0.07);
  border-top: 1px solid rgba(211,47,47,0.2);
  font-size: 13px;
  color: var(--text2);
}

.mixDayDesignSelect {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mixDayDesignSelect select {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}

.mixDayDesignName {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.mixDayWorkabilityRow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--text2);
}

.mixDayWorkabilityRow strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.mixDayDetails {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.mixDayDetails span {
  font-size: 12px;
  color: var(--text2);
}

.mixDayDetails strong {
  color: var(--text);
  font-weight: 700;
}

.mixDayRow small {
  color: var(--text3);
  font-size: 11px;
  line-height: 1.35;
}

.mixDayRow small.mixWeatherNote {
  color: #76500b;
  font-weight: 700;
}

.weatherRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.weatherBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.refreshWeatherBtn {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.refreshWeatherBtn:active {
  opacity: 0.7;
}

.weatherChip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.weatherChip svg {
  width: 15px;
  height: 15px;
}

.weatherNote {
  margin-top: 8px;
  color: var(--text3);
  font-size: 11px;
  line-height: 1.4;
}

.demoWeatherBadge {
  border: 1px solid #f0c46d;
  border-radius: 999px;
  background: var(--amber-bg);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.forecastStrip {
  display: grid;
  grid-template-columns: repeat(8, minmax(92px, 1fr));
  gap: 8px;
  min-width: 0;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.forecastHour {
  display: grid;
  min-width: 92px;
  gap: 3px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface2);
}

.forecastHour strong {
  font-size: 12px;
}

.forecastHour span {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 800;
}

.forecastHour small {
  color: var(--text2);
}

.detailHeaderInner {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  max-width: 720px;
}

.detailHeaderInner > .statusPill {
  justify-self: end;
}

.emptyState,
.alertLine {
  padding: 12px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 13px;
}

.emptyState {
  background: var(--surface2);
  color: var(--text2);
}

.alertLine {
  margin-bottom: 10px;
  background: var(--red-bg);
  color: var(--red);
  font-weight: 700;
}

.additiveList,
.chipRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chipRow.compact {
  gap: 6px;
}

.chipRow.compact .chip {
  padding: 5px 8px;
  font-size: 11px;
}

.additiveList span {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text2);
  font-size: 13px;
}

.jobNotes {
  margin-top: 12px;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.45;
}

.overviewGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.overviewItem {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
}

.overviewItem span {
  color: var(--text3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.overviewItem strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.25;
}

.overviewItemWide {
  grid-column: 1 / -1;
}

.mixPanel .mixGrid {
  margin-bottom: 4px;
}

.mixPanel .additiveList {
  margin-top: 12px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   LAB-CALIBRATION (materials-lab / ASTM lens)
   Scoped to .lab* classes so curb/field overviews are untouched.
   ──────────────────────────────────────────────────────────────────────────── */

/* Water ledger — monospace "receipt": each source on its own line, the ÷ ratio
   line (always last) ruled off and accented so the corrected w/c is traceable. */
.labLedger {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
  color: var(--text2);
  padding: 12px 14px;
}
.labLedger strong {
  font-weight: 600;
  color: var(--text);
}
.labLedger > div:last-child {
  margin-top: 7px;
  padding-top: 8px;
  border-top: 1px solid var(--border2);
}
.labLedger > div:last-child strong {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

/* Mix design rows — spec fields with a left status rail (amber unset / teal set) */
.labMixPanel .mixChoice {
  padding: 12px 14px;
  border-left-width: 3px;
  border-left-color: var(--border2);
}
.labMixPanel.mixRequired .mixChoice:not(.active) {
  border-left-color: var(--amber);
  background: color-mix(in srgb, var(--amber-bg) 45%, var(--surface));
}
.labMixPanel .mixChoice.active {
  border-left-color: var(--accent);
}

/* Calibration-readings panel reads as a real instrument, not an empty slot */
.sensorPanel.labSensorPanel {
  border-style: solid;
}

.batchTicketBox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
}

.batchTicketBox span {
  display: block;
  margin-top: 3px;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.35;
}

.batchTicketActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.batchTicketPreview {
  flex: 1 0 100%;
  max-height: 320px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
}

.batchTicketPreview img {
  display: block;
  width: 100%;
  height: auto;
}

.batchTicketSummary {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.batchTicketBox > .fieldNote,
.batchTicketResultActions {
  flex: 1 0 100%;
}

.batchTicketResultActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.batchTicketResultActions .btn {
  flex: 1 1 auto;
}

.batchTicketFieldList {
  display: grid;
  gap: 2px;
  margin-bottom: 16px;
}

.batchTicketFieldRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.batchTicketFieldRow span {
  font-size: 13px;
  color: var(--text2);
}

.batchTicketFieldRow strong {
  font-size: 13px;
  text-align: right;
}

.batchTicketRawText {
  max-height: 220px;
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.updatesPanel {
  display: grid;
  gap: 14px;
}

.deleteJobPanel,
.jobControlPanel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px dashed #efb0a8;
  border-radius: var(--r);
  background: #fffafa;
}

.jobControlPanel {
  border-color: var(--border);
  border-style: solid;
  background: var(--surface2);
}

.deleteJobPanel span,
.jobControlPanel span {
  display: block;
  margin-top: 3px;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.35;
}

.updateForm {
  display: grid;
  gap: 12px;
  padding-bottom: 2px;
}

.updateForm .btn {
  justify-self: start;
}

.updateTextGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.updateForm textarea {
  min-height: 92px;
}

.cameraUploadButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
  cursor: pointer;
}

.cameraUploadButton:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--blue-mid);
}

.cameraUploadButton:focus-within {
  border-color: var(--accent);
  outline: 3px solid var(--accent-bg);
}

.cameraUploadButton input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.updateTimeline {
  display: grid;
  gap: 10px;
}

.updateItem {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
}

.updatePhotoFrame {
  display: grid;
  width: 100%;
  min-height: 96px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text3);
}

.updatePhotoFrame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.updatePhotoFrame svg {
  width: 28px;
  height: 28px;
}

.updateContent {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.updateTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.updateTop h4 {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.25;
}

.updateMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.updateMeta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text2);
  font-size: 11px;
  font-weight: 700;
}

.updateDelete {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text2);
}

.updateDelete:hover {
  border-color: #e5aaaa;
  color: var(--red);
}

.updateNote,
.updateCause {
  color: var(--text2);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.updateCause {
  padding-left: 9px;
  border-left: 3px solid var(--amber);
}

.updateCause strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
}

.recommendation.ok {
  border-color: #9ed8e1;
}

.recommendation.watch {
  border-color: #b0cadf;
}

.recommendation.warning {
  border-color: #e3c178;
}

.recommendation.critical {
  border-color: #e2a3a3;
}

.recommendation.ok .panelHeader svg {
  color: var(--green);
}

.recommendation.watch .panelHeader svg {
  color: var(--blue);
}

.recommendation.warning .panelHeader svg {
  color: var(--amber);
}

.recommendation.critical .panelHeader svg {
  color: var(--red);
}

.twoColumn {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 16px;
}

.twoColumn h4 {
  margin-bottom: 8px;
  font-size: 13px;
}

.actionItem,
.factorItem {
  padding: 10px 11px;
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text2);
  font-size: 13px;
  line-height: 1.35;
}

.actionItem + .actionItem,
.factorItem + .factorItem {
  margin-top: 7px;
}

.factorItem.compact {
  padding: 8px 9px;
  font-size: 12px;
}

.actionItem.compact {
  padding: 8px 9px;
  font-size: 12px;
}

.factorItem strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
}

.factorItem.ok {
  background: var(--green-bg);
}

.factorItem.watch {
  background: var(--blue-bg);
}

.factorItem.warning {
  background: var(--amber-bg);
}

.factorItem.critical {
  background: var(--red-bg);
}

.sensorSecondaryAction {
  color: var(--text2);
  font-size: 12px;
  line-height: 1.35;
}

.sheetOverlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;      /* was flex-end — center the modal */
  justify-content: center;
  padding: 20px;            /* keep the card off the screen edges */
  background: rgba(0, 0, 0, 0.45);
}

.sheet {
  width: 100%;
  max-width: 460px;         /* was 720px — a centered card */
  margin: auto;             /* centered by the overlay's flexbox */
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--safe-area-bottom) + 20px);
  border: 0;
  border-radius: 16px;      /* all corners — bottom corners were square before */
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.sheetHandle {
  display: none;            /* drag handle is a bottom-sheet affordance */
}

.sheetHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.sheetHeader h3 {
  margin-top: 2px;
  font-size: 17px;
}

.sheetClose {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--text2);
}

.sheet > label,
.sheet > .fieldBlock,
.sheet > p,
.sheet > div:not(.sheetHandle):not(.sheetHeader) {
  margin: 18px 20px 0;
}

.sheet > button {
  display: block;
  margin: 10px 20px 0;
  width: calc(100% - 40px);
}

label,
.fieldBlock {
  display: grid;
  gap: 6px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

textarea {
  resize: vertical;
  line-height: 1.45;
  text-transform: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-bg);
}

.addrToggle {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.addrOpt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  gap: 7px;
  min-height: 40px;
  padding: 9px 10px;
  border: 0;
  background: var(--surface);
  color: var(--text2);
  font-size: 13px;
  font-weight: 700;
}

.addrOpt + .addrOpt {
  border-left: 1px solid var(--border);
}

.addrOpt.selected {
  background: var(--accent-bg);
  color: var(--accent);
}

.gpsStatus {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #9ed8e1;
  border-radius: var(--r-sm);
  background: var(--green-bg);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.gpsStatus.error {
  border-color: #e5aaaa;
  background: var(--red-bg);
  color: var(--red);
}

.gpsStatus.pending {
  border-color: #b0cadf;
  background: var(--blue-bg);
  color: var(--blue);
}

.gpsDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(55, 171, 191, 0.18);
}

.addressSuggestions {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.addressSuggestions.open {
  display: flex;
}

.addressOption {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.addressOption:hover {
  background: var(--surface2);
}

.addressOption strong {
  display: block;
  font-size: 13px;
}

.addressOption span {
  display: block;
  margin-top: 2px;
  color: var(--text3);
  font-size: 11px;
  line-height: 1.35;
}

.profileFormGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mixGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mixChoice {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  letter-spacing: 0;
  text-transform: none;
}

.mixChoice:hover {
  border-color: var(--border2);
}

.mixChoice.active {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.mixChoice[role="button"]:active {
  background: var(--surface2);
}

.mixChoice[role="button"]:focus-visible {
  outline: 3px solid var(--accent-bg);
  border-color: var(--accent);
}

.mixChoice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mixChoiceHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mixChoiceTitleRow {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mixChoiceActiveBadge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-tint, rgba(59,130,246,0.1));
  border-radius: 4px;
  padding: 2px 5px;
  flex-shrink: 0;
}

.curbColorRow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.curbColorRow + .curbColorRow {
  border-top: 1px solid var(--border);
}

.curbColorLabel {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  flex-shrink: 0;
}

.curbColorValue {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.curbColorEditBtn {
  background: none;
  border: none;
  color: var(--text3);
  padding: 0;
  min-height: auto;
  flex-shrink: 0;
}

.curbColorAddBtn {
  flex: 1;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  padding: 0;
  min-height: auto;
  text-align: left;
}

.mixChoice strong {
  color: inherit;
  font-size: 13px;
}

.curbDesignEditBtn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  padding: 0;
  min-height: auto;
  cursor: pointer;
  flex-shrink: 0;
}

.curbDesignUseBtn {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  min-height: auto;
  cursor: pointer;
  flex-shrink: 0;
}

.mixChoice span {
  color: var(--text3);
  font-size: 11px;
  line-height: 1.35;
}

.mixProfileToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 8px;
}

.setDefaultMixBtn {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  background: transparent;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}


.mixProfileSelectHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mixProfileSelectHeader .fieldTitle {
  margin: 0;
}

.mixProfileSummary {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.mixProfileSummary strong {
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.mixProfileSummary span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.retryLink {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.inlineAction {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--blue-mid);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.mixProfileBuilder {
  display: grid;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
}

.mixProfileBuilder[hidden],
.aggregateBuilder[hidden],
#addrManual[hidden],
#addrGps[hidden] {
  display: none;
}

/* Material-type gating: a hidden data-show-for block must stay hidden even when
   its base class sets display (e.g. .fieldBlock/.profileFormGrid use grid). The
   UA [hidden]{display:none} loses to those author rules, so pin it here. */
[data-show-for][hidden] {
  display: none !important;
}

/* Lab editor progressive aggregates: same hidden-pin for the fine/coarse blocks
   (.fieldBlock is grid) and the + aggregate buttons (.btn is inline-flex). */
.labAggBlock[hidden],
.labAggAddRow .btn[hidden] {
  display: none !important;
}

/* Specimen shape toggle: same hidden-pin (.profileFormGrid is grid). */
[data-role="specimen-cylinder-fields"][hidden],
[data-role="specimen-square-fields"][hidden] {
  display: none !important;
}

/* A nested card, distinct from the surrounding form fields — a box inside the sheet. */
.labAggBlock {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
}

.labAggAddRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.labAggBlockHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.labAggBlockHeader .fieldTitle {
  margin: 0;
}

.labDerivedType strong {
  color: var(--text);
}

.builderActions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.aggregateManager,
.aggregateBuilder {
  display: grid;
  gap: 9px;
}

.aggregateBuilder {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.aggregateChips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.aggregateChip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
}

.aggregateChip button {
  display: inline-grid;
  width: 17px;
  height: 17px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--text3);
}

.formError {
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--red-bg);
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.createJobBtn {
  margin: 18px 20px 0;
  width: calc(100% - 40px);
  min-height: 46px;
}

.settingsNote {
  margin: 14px 20px 0;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.45;
  }
}

.pulsing {
  animation: pulse 1.2s ease-in-out infinite;
}

@media (min-width: 760px) {
  .scrollBody {
    padding-inline: 22px;
  }

  .twoColumn {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .header {
    height: 68px;
    padding-inline: 16px;
  }

  .headerInner {
    gap: 12px;
  }

  .headerActions {
    gap: 6px;
  }

  .logo {
    gap: 8px;
  }

  .logoImg {
    width: min(190px, 50vw);
    height: 40px;
  }

  .logoVersion {
    display: inline-flex;
    font-size: 10px;
    padding: 3px 7px;
  }

  .sourcePath {
    display: none;
  }

  .detailHeader {
    min-height: 64px;
    padding-inline: 12px;
  }

  .detailHeaderInner {
    gap: 8px;
  }

  .detailLeft {
    gap: 8px;
  }

  .detailLogoImg {
    width: min(112px, 26vw);
    height: 28px;
  }

  .jobSelect {
    padding-inline: 12px;
  }

  .jobTop {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .jobTop strong {
    max-width: 100%;
  }

  .panelHeader {
    flex-direction: row;
  }

  .segmented {
    width: 100%;
  }

  .sensorActions .btn {
    flex: 1 1 150px;
  }

  .sensorReadingLayout {
    grid-template-columns: 1fr;
  }

  .sensorRecommendationTiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metricGrid,
  .profileFormGrid,
  .overviewGrid,
  .mixGrid,
  .aggregateBuilder,
  .updateTextGrid,
  .updateItem {
    grid-template-columns: 1fr;
  }

  .mixDayTop {
    flex-direction: column;
  }

  .batchTicketBox {
    align-items: stretch;
    flex-direction: column;
  }

  .mixDayTop span {
    text-align: left;
  }


  .mixDayName {
    grid-column: 2 / -1;
  }

  .updatePhotoFrame {
    min-height: 180px;
  }

  .weatherChip {
    flex: 1 1 145px;
  }

  .deleteJobPanel {
    align-items: stretch;
    flex-direction: column;
  }

  .deleteJobPanel .btn {
    width: 100%;
  }

}

/* ── Auth screen ─────────────────────────────────────── */

.authScreen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
  background: var(--bg);
}

.authCard {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.authLogo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.authLogo .logoImg {
  height: 32px;
  width: auto;
}

.authCard h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.authForm {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.authSubmitBtn {
  width: 100%;
  margin-top: 4px;
}

.authError {
  margin: 0;
  padding: 10px 12px;
  background: var(--red-bg);
  color: var(--red);
  border-radius: var(--r-sm);
  font-size: 13px;
}

.authForgotBtn {
  background: none;
  border: none;
  padding: 0;
  color: var(--text3);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  font: inherit;
  width: 100%;
}

.authToggleBtn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}

/* Reads as inline navigation ("Already have an account? Sign in"), not a peer
   action button next to the primary submit — only the action word links out. */
.authModeToggle {
  color: var(--text3);
}

.authToggleAction {
  color: var(--accent);
  text-decoration: underline;
}

.authNote {
  margin: 0;
  color: var(--text3);
  font-size: 13px;
  text-align: center;
}

.authSuccess {
  margin: 0;
  padding: 10px 12px;
  background: var(--green-bg, #d1fae5);
  color: var(--green, #065f46);
  border-radius: var(--r-sm);
  font-size: 13px;
}

.authForgotBtn {
  background: none;
  border: none;
  padding: 0;
  color: var(--text3);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  width: 100%;
  margin-top: 2px;
}

.authForgotBtn:hover {
  color: var(--accent);
}

/* ── Sign-up screen ──────────────────────────────────────
   Deliberately NOT the .authCard shape. S-29 made sign-in and sign-up read
   differently by copy alone; that still wasn't enough to tell two near-identical
   cards apart at a glance, so create-account gets a full-bleed accent header and
   sign-in keeps the plain card. The difference IS the feature — don't converge
   these two layouts again. */

.authScreenSignup {
  display: block;
  align-items: initial;
  justify-content: initial;
  padding: 0;
  background: var(--surface);
}

.signupHeader {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: calc(var(--safe-area-top) + 30px) 20px 28px;
  background: var(--accent-deep);
  color: var(--surface);
}

.signupBadge {
  align-self: flex-start;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.signupTitle {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.signupLede {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.signupForm {
  gap: 16px;
  padding: 24px 20px 0;
}

.signupField input {
  min-height: 48px;
  padding: 13px 15px;
  border: 1px solid var(--border2);
  border-radius: var(--r);
  font-weight: 600;
  text-transform: none; /* the wrapping <label> uppercases its text, not its value */
}

/* Holds the trailing match mark inside the confirm field's box. */
.signupInputWrap {
  position: relative;
  display: flex;
  align-items: center;
}

.signupInputWrap input {
  padding-right: 44px;
}

.signupMatchMark {
  position: absolute;
  right: 16px;
  font-size: 16px;
  font-weight: 800;
}

.signupMatchMark.isMatch {
  color: var(--green);
}

.signupMatchMark.isMismatch {
  color: var(--red);
}

/* Matches the header band rather than the app's usual .btn.primary teal: the two
   sit in the same eyeful here, and white-on---accent is too low-contrast at this
   size anyway. Screen-local — .btn.primary elsewhere is unchanged. */
.authScreenSignup .btn.primary.signupSubmitBtn {
  min-height: 52px;
  margin-top: 8px;
  border-radius: 12px;
  background: var(--accent-deep);
  font-size: 16px;
}

.signupToggle {
  padding: 18px 20px calc(var(--safe-area-bottom) + 24px);
  font-size: 14px;
  width: 100%;
}

.settingsGroup {
  margin: 16px 0 0;
}

.settingsGroupLabel {
  padding: 0 20px 6px;
  color: var(--text3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.settingsRow,
.settingsRowBtn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 20px;
  background: var(--surface1);
  border: none;
  border-top: 1px solid var(--border);
  cursor: default;
  text-align: left;
}

.settingsRow:last-child,
.settingsRowBtn:last-child {
  border-bottom: 1px solid var(--border);
}

.settingsRowBtn {
  cursor: pointer;
  color: var(--text1);
  font-size: 15px;
  font-weight: 500;
}

.settingsRowBtn:active {
  background: var(--surface2);
}

.settingsRowBtn.danger {
  color: var(--red, #d94f4f);
}

.settingsRowBtn svg {
  flex-shrink: 0;
  color: var(--text3);
}

.settingsRowBtn svg:last-child {
  margin-left: auto;
  width: 14px;
  height: 14px;
}

.settingsRowBtn.danger svg:first-child {
  color: var(--red, #d94f4f);
}

.settingsRow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.settingsRowHint {
  font-size: 13px;
  color: var(--text2);
}

/* ===== Delete-account: danger-zone trigger + confirmation modal ===== */

/* Low-emphasis Delete-account link, pinned at the bottom of the Settings sheet */
.dangerZone {
  margin-top: 28px;
  padding: 18px 20px calc(env(safe-area-inset-bottom, 16px) + 8px);
  border-top: 1px solid var(--border);
  text-align: center;
}

.deleteAccountLink {
  display: inline-block;
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.8;
  cursor: pointer;
}

.deleteAccountLink:active,
.deleteAccountLink:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Centered confirmation modal, floats above the open Settings sheet */
.deleteModalOverlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 17, 14, 0.42);
  outline: none;
}

.deleteModalCard {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border-radius: 18px;
  padding: 22px 18px 16px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.deleteModalIcon {
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  border-radius: 50%;
  background: var(--red-bg);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.deleteModalIcon svg {
  width: 24px;
  height: 24px;
}

.deleteModalTitle {
  margin: 0 0 7px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.deleteModalMsg {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text2);
}

.deleteModalMsg--error {
  color: var(--red);
}

.deleteModalDanger {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 11px;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.deleteModalDanger:disabled {
  opacity: 0.6;
  cursor: default;
}

.deleteModalCancel {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--text2);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* Mix-design connect gate — centered modal (same shape as the delete-account
   modal), amber accent instead of red. */
.mixGateOverlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 17, 14, 0.42);
  outline: none;
}
.mixGateCard {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border-radius: 18px;
  padding: 22px 18px 16px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
.mixGateIcon {
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  border-radius: 50%;
  background: var(--amber-bg);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mixGateIcon svg { width: 24px; height: 24px; }
.mixGateTitle {
  margin: 0 0 7px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.mixGateMsg {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text2);
}
.mixGatePrimary {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: none;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.mixGateSecondary {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--text2);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}


.settingsFormField {
  display: grid;
  gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settingsInput {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  text-transform: none;
  letter-spacing: 0;
  width: 100%;
  box-sizing: border-box;
}

.otaSection {
  padding: 12px 20px;
  display: grid;
  gap: 10px;
}

.otaProgressBar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.otaProgressFill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.2s ease;
}

.otaProgressPct {
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  text-align: right;
  font-family: var(--mono);
}

.otaStatusMsg {
  font-size: 13px;
  color: var(--text2);
  margin: 0;
}

.otaStatusMsg.otaSuccess {
  color: #1a7a3d;
  font-weight: 600;
}

.otaStatusMsg.otaError {
  color: var(--red, #d94f4f);
  font-weight: 600;
}

.otaDeviceVersion {
  font-size: 12px;
  color: var(--text3, var(--text2));
  margin: 0 0 6px;
}

.accountRow {
  cursor: default;
}

.settingsAvatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

.settingsRowBody {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settingsRowBody strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text1);
}

.settingsRowBody span {
  font-size: 13px;
  color: var(--text2);
}

.settingsAdvanced {
  border: none;
}

.settingsAdvancedSummary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--surface1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.settingsAdvancedSummary::-webkit-details-marker {
  display: none;
}

.settingsAdvancedSummary svg:last-child {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: var(--text3);
  transition: transform 0.2s;
}

.settingsAdvanced[open] .settingsAdvancedSummary svg:last-child {
  transform: rotate(90deg);
}

.settingsAdvancedForm {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface1);
  border-bottom: 1px solid var(--border);
}

/* Research data capture */
.researchFields {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 12px;
}

.researchActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.researchActions .btn {
  flex: 1;
  min-width: 140px;
}

/* Strength follow-up — result rows under "Log strength" */
.strengthResultsList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.strengthResultsList li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.strengthResultsList li:last-child {
  border-bottom: none;
}

/* Plain label/value rows inside sheets (log-strength Mix + Age) */
.sheetValueRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.sheetValueRow span {
  font-size: 13px;
  color: var(--text2);
}

.admixtureRow {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
}

.admixtureRow + .admixtureRow {
  margin-top: 10px;
}

.admixtureRowHeader {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admixtureRowHeader select {
  flex: 1;
  margin: 0;
}

.admixtureRemoveBtn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.admixtureRemoveBtn:hover {
  background: var(--surface2);
  color: var(--text1);
}

.admixtureRemoveBtn svg {
  width: 14px;
  height: 14px;
}

.admixToggles {
  margin-top: 10px;
}


.admixToggleRow {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.admixToggleRow:first-child {
  border-top: 1px solid var(--border);
}

.admixToggleLabel {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
}

.admixToggleLabel input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: auto;
  accent-color: var(--accent);
  cursor: pointer;
}

.admixToggleFields {
  margin-top: 8px;
  padding-left: 28px;
}

.sandMaterialList {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.sandMaterialRow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.sandMaterialRow:last-child {
  border-bottom: none;
}

.sandSwatch {
  width: 10px;
  height: 38px;
  border-radius: 4px;
  flex-shrink: 0;
}

.sandMaterialInfo {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sandMaterialNameInput,
.sandMaterialSourceInput {
  border: none;
  background: transparent;
  padding: 0;
  width: 100%;
  min-height: auto;
  box-shadow: none;
}

.sandMaterialNameInput {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.sandMaterialSourceInput {
  font-size: 13px;
  font-weight: 400;
  color: var(--text2);
}

.sandMaterialNameInput:focus,
.sandMaterialSourceInput:focus {
  outline: none;
  color: var(--accent);
}

.sandMaterialNameStatic {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.sandMaterialSource {
  font-size: 13px;
  color: var(--text2);
}

.sandCementCount {
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  flex-shrink: 0;
  padding: 0 4px;
}

.sandSwatch--sand {
  background: #C4A87A;
}

.sandSwatch--admix {
  background: #5B9BD5;
}

.sandMaterialRow--admix {
  opacity: 0.85;
}

.sandStepper {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.sandStepBtn {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s;
}

.sandStepBtn:active {
  background: var(--accent-bg, rgba(59 130 246 / 0.1));
  border-color: var(--accent);
}

.sandStepperInput {
  width: 44px;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 4px 2px;
  font-size: 14px;
  font-weight: 600;
  min-height: auto;
  -moz-appearance: textfield;
}

.sandStepperInput::-webkit-inner-spin-button,
.sandStepperInput::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.sandMaterialRemoveBtn {
  margin-left: 2px;
  flex-shrink: 0;
}

.sandPicker {
  margin-top: 10px;
  padding: 14px;
  background: var(--surface-alt, var(--surface));
  border: 1px solid var(--border);
  border-radius: 12px;
}

.sandPickerLabel {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.sandPickerList {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sandPickerItemRow {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sandPickerItemRow .sandPickerItem {
  flex: 1;
}

.sandLibraryDeleteBtn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--text3);
  background: transparent;
}

.sandLibraryDeleteBtn:active {
  background: var(--surface2);
}

.sandPickerItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  min-height: auto;
  width: 100%;
}

.sandPickerItem:active {
  background: var(--accent-tint, #e8f4f0);
}

.sandPickerName {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.sandPickerSource {
  font-size: 13px;
  color: var(--text-secondary);
}

.sandPickerForm {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cementPickerFieldLabel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sandPickerNameInput,
.sandPickerSourceInput {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
  min-height: auto;
}

.sandPickerConfirm {
  flex: 1;
}

.sandPickerCancel {
  flex: 1;
}

.curbProfileList {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.curbProfileRow {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background 0.12s;
}

.curbProfileRow:last-child {
  border-bottom: none;
}

.curbProfileRow--active {
  background: var(--accent-bg, rgba(59 130 246 / 0.07));
}

.curbProfileLabel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  cursor: pointer;
}

.curbProfileLabel input[type="radio"] {
  min-height: auto;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.curbProfileMain {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.curbProfileName {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.curbProfileDescSmall {
  font-size: 12px;
  color: var(--text2);
}

.curbProfileHeight {
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  flex-shrink: 0;
}

.curbProfileExpanded {
  padding: 0 12px 12px;
}

.curbDimSummary {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.curbProfileDoneBtn {
  margin-top: 10px;
  display: block;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  text-align: center;
}

.tierToggle {
  display: flex;
  gap: 8px;
}

.tierOpt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text2);
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}

.tierOpt input[type="radio"] {
  min-height: auto;
  width: auto;
  accent-color: var(--accent);
}

.tierOpt:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-bg, rgba(var(--accent-rgb, 59 130 246) / 0.08));
  color: var(--text);
}

.wcRatioDisplay {
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text2);
}

.wcRatioDisplay strong {
  color: var(--text);
}

.fieldNote {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text3);
}

.additionNote {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text2);
  margin-top: 1px;
  font-style: italic;
}

/* ─── Toast notifications ──────────────────────────────────────────────────── */

#toastContainer {
  position: fixed;
  bottom: calc(var(--safe-area-bottom) + 24px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 420px;
}

.toast {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(139,26,26,0.15);
}

.toast--warning {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid rgba(146,96,10,0.15);
}

.toast--success {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(45,106,79,0.15);
}

/* Mix history — previous days inside the Mix monitor */
.mixHistorySection {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.mixHistoryHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mixHistoryDay { margin-top: 10px; }
.mixHistoryDate {
  display: block;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.65;
  margin-bottom: 4px;
}
.mixHistorySection .mixDayRowHeader[disabled] { cursor: default; pointer-events: none; }

/* S-14 — per-cycle rating list (active mix). Closed cycles are historical
   record (compact one-line summary, no controls); only the open cycle gets
   the full input card — cuts the repeated-row clutter down to at most one
   full detail block at a time. */
.mixCycleRatingList { display: flex; flex-direction: column; gap: 10px; }
.mixCycleRatingRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.mixCycleRatingRow--closed {
  width: 100%;
  padding: 4px 2px;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  border-radius: 6px;
}
.mixCycleRatingRow--closed:hover,
.mixCycleRatingRow--closed:focus-visible { background: var(--surface2); }
/* Groups label+summary as one flex item so only THEY wrap against each other —
   the trailing chevron stays pinned on the same line, never wrapping alone. */
.mixCycleHistoryInfo {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  flex: 1;
  min-width: 0;
}
.mixCycleRatingLabel { font-size: 12px; color: var(--text2); flex-shrink: 0; }
.mixCycleRatingRow--open .mixCycleRatingLabel { color: var(--text); font-weight: 600; }
.mixCycleRatingRow--final .mixCycleRatingLabel { color: var(--text); font-weight: 600; }
/* Same chevron affordance as .ovenSummary/.advancedBlock: unrotated = tap to
   expand (on the closed row itself), rotated 90deg = tap to collapse (its own
   button, since the open card can't itself be the toggle target). */
.mixCycleRatingChevron,
.mixCycleRatingChevronBtn {
  color: var(--text3);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.mixCycleRatingChevronBtn {
  border: none;
  background: transparent;
  padding: 4px;
  margin: -4px 0 -4px -4px;
  border-radius: 6px;
}
.mixCycleRatingChevronBtn:hover { background: var(--surface2); }
.mixCycleRatingChevronBtn--open { transform: rotate(90deg); }
.mixCycleHistorySummary {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text2);
}
.workabilityStepper--sm .workabilityStepValue { min-width: 2ch; text-align: center; }

/* Task 4 — running w/c ledger under the open cycle */
.mixCycleRatingRow .labLedger { flex-basis: 100%; padding: 10px 12px; margin-top: 2px; }
.cycleWc {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text2);
  flex-shrink: 0;
}

/* Task 3 — per-cycle water + consistency capture (in-memory only), open cycle only */
.mixCycleCaptureFields { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cycleWaterField,
.cycleConsField {
  display: flex;
  flex-direction: column;
  font-size: 10px;
  color: var(--text2);
  gap: 3px;
}
.cycleWaterField input,
.cycleConsField input {
  width: 64px;
  font-size: 12px;
  font-family: var(--mono);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 5px 7px;
}
.cycleWaterField input:focus,
.cycleConsField input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Standard "box" input controls (field kit) */
.comboField { display: block; }
.comboField select { width: 100%; }
.comboOther { margin-top: 8px; }

/* ── Build mix (curb) — shipped curb Build-mix UI (real for every curb job, gated behind ?preview=curb-mix* only for the dev preview harness) ── */
.buildMixSheet { max-width: 440px; }
.bmSub { font-size: 12px; color: var(--text2); margin: 2px 0 0; }
.bmStack { display: grid; gap: 12px; }
.bmSectionLabel { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text2); }
.bmSection { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r); padding: 12px; display: grid; gap: 10px; }
.bmSectionHead { display: flex; align-items: center; justify-content: space-between; min-height: 22px; }
.bmRatioBadge { font-family: var(--mono); font-size: 11px; font-weight: 500; background: var(--blue-bg); color: var(--blue); border: 1px solid #c8e6ec; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.bmSandRow { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; display: grid; gap: 10px; }
.bmChips { display: flex; gap: 6px; align-items: center; }
.bmChip { flex: 1; min-height: 36px; border-radius: 999px; border: 1px solid var(--border2); background: var(--surface); color: var(--text2); font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; }
.bmChip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 800; }
.bmPartsRow { display: flex; align-items: center; justify-content: space-between; }
.bmPartsLabel { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text3); }
.bmStepper { display: flex; align-items: center; gap: 12px; }
.bmStepBtn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border2); background: var(--surface); color: var(--text); font-size: 16px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.bmStepBtn.plus { background: var(--accent); border-color: var(--accent); color: #fff; }
.bmStepVal { font-family: var(--mono); font-size: 16px; min-width: 18px; text-align: center; }
.bmMaterialRow { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.bmMaterialRow strong { font-size: 13px; }
.bmMaterialSub { display: block; font-size: 11px; color: var(--text3); margin-top: 2px; }
.bmValueRow { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.bmValueRow > span:first-child { font-weight: 600; min-width: 0; }
.bmRowRight { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.bmRowRight strong { font-family: var(--mono); font-weight: 500; font-size: 13px; }
.bmEditLink { background: none; border: none; padding: 0; color: var(--accent); font-family: var(--font); font-size: 12px; font-weight: 700; cursor: pointer; }
.bmGotoList { display: grid; gap: 10px; }
.bmGotoCard { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); display: grid; gap: 8px; cursor: pointer; font-family: var(--font); transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.bmGotoCard:hover { border-color: var(--border2); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transform: translateY(-1px); }
.bmGotoTop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bmGotoTop strong { font-size: 14px; }
.bmGotoStar { color: var(--accent); }
.bmGotoChips { display: flex; flex-wrap: wrap; gap: 6px; }
.bmTagChip { font-size: 11px; font-weight: 600; background: var(--surface2); border: 1px solid var(--border); color: var(--text2); border-radius: 999px; padding: 3px 9px; }
.bmTagChip.accent { background: var(--accent-bg); border-color: #c8e6ec; color: var(--blue); }
.bmShowMore { background: none; border: none; color: var(--blue-mid); font-family: var(--font); font-size: 13px; font-weight: 600; padding: 0; cursor: pointer; text-align: left; justify-self: start; }
.bmInlineEditor { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: grid; gap: 8px; }
.bmInlineEditor label { display: grid; gap: 6px; }
.bmCustomRow { display: flex; gap: 8px; }
.bmCustomRow input { flex: 1; }
.bmChipBtn { cursor: pointer; font-family: var(--font); }
.bmCustomName { margin: 0; font-size: 13px; font-weight: 700; }
.bmValueRow.editing { border-color: var(--accent); }
/* Info semantics, not a warning (DESIGN.md Hard Rule 11) — promoting a
   recurring tweak to a go-to variant is a suggestion, not something to fix. */
.bmNudge { background: var(--blue-bg); border: 1px solid rgba(14, 103, 116, 0.25); border-radius: 8px; padding: 12px; display: grid; gap: 10px; }
.bmNudge strong { font-size: 13px; color: var(--blue); }
.bmNudgeActions { display: flex; flex-wrap: wrap; gap: 8px; }
.bmNudgeActions > * { flex: 1 1 auto; }
.bmTodayChips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.bmGotoCard.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.bmGotoCard.selected:hover { border-color: var(--accent); }

/* S-33 condition chips — independent booleans, so unlike .loadSizeChip these are
   a multi-select group. Touch target holds the 36px floor from DESIGN.md. */
.conditionChipsRow {
  margin-bottom: 10px;
}

.conditionChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.conditionChip {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
}

.conditionChip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
  font-weight: 600;
}

/* S-33 day-level note. One per job-day, distinct from the per-mix Notes input
   inside the observations panel. */
.dayNotesBlock {
  margin-top: 12px;
}

.dayNotesBlock textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 16px; /* DESIGN.md Hard Rule 6 — smaller triggers iOS zoom-on-focus */
  resize: vertical;
}

.dayNotesBlock textarea:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-bg);
}
/* ── Choose-a-job prompt + unfiled readings ────────────────────────────────── */
/* The connect gate means a crew can be connected with no job picked, so readings can
   arrive unfiled. The prompt heads that off; the sheet files them afterwards. */

.jobPickPrompt {
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--r);
  background: var(--accent-bg);
}

.jobPickPromptTitle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
}

.jobPickPromptTitle svg {
  width: 16px;
  height: 16px;
}

.jobPickPromptBody {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
}

.unfiledEntryRow {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 1px solid var(--amber);
  border-radius: var(--r);
  background: var(--amber-bg);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.unfiledEntryRow svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text2);
}

.unfiledEntryBody {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.unfiledEntryBody strong {
  font-size: 15px;
  font-weight: 800;
}

.unfiledEntryBody span {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  color: var(--text2);
}

.unfiledGroupList,
.unfiledJobList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.unfiledGroup {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.unfiledGroupTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.unfiledGroupTop strong {
  font-size: 16px;
  font-weight: 800;
}

.unfiledGroupMeta {
  margin: 0 0 2px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  color: var(--text2);
}

.unfiledGroupMeta.muted {
  color: var(--text3);
}

.unfiledGroup .btn {
  margin-top: 10px;
  width: 100%;
}

.unfiledPickHeader {
  margin-bottom: 14px;
}

.unfiledPickSummary {
  margin: 2px 0 0;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  color: var(--text2);
}

.unfiledJobBtn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}


/* Batch ticket list: each scanned ticket, with the current one marked. */
.batchList {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.batchListItem {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.unfiledJobBtn:hover {
  border-color: var(--border2);
}

.unfiledJobBtn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text2);
}

.unfiledJobBody {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.unfiledJobBody strong {
  font-size: 15px;
  font-weight: 800;
}

.unfiledJobBody span {
  font-size: 13px;
  color: var(--text2);
}
.gateJobName {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}
/* Connect step: back arrow sits above the logo, so leaving is the same gesture as every
   other screen's back rather than a link buried under the actions. */
.gateCard {
  position: relative;
  align-items: stretch;
}

.gateBack {
  align-self: flex-start;
  margin-bottom: -8px;
}

.gateSkipBtn {
  width: 100%;
}

/* Which job the live connection files to — green because connected is an ok state
   (DESIGN.md rule 11), quiet enough to sit above every screen without shouting. */
.sensorConnectedBanner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 10px 14px;
  border: 1px solid var(--green);
  border-radius: var(--r);
  background: var(--green-bg);
  font-size: 13px;
  color: var(--text);
}

.sensorConnectedDot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
}

/* Sensor panel — the connect/disconnect surface, split out of the Mix monitor card.
   Collapsed it reads like the connected banner: a status dot and the job it files to. */
.sensorConnectSummary {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text2);
}

.sensorConnectPanel.connected .sensorConnectSummary {
  color: var(--text);
}

.sensorConnectPanel.collapsed .sensorActions,
.sensorConnectPanel.collapsed .sensorConfigRow {
  display: none;
}

.sensorConnectPanel .sensorActions {
  margin-top: 12px;
}

/* Build-mix sheet: everything past the name is optional, so it folds away behind one
   control. The summary keeps the defaults visible — folded is not the same as hidden. */
.bmAdvancedToggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.batchListItem span {
  font-size: 13px;
  color: var(--text2);
}

.batchListItem strong {
  font-size: 13px;
  white-space: nowrap;
}

.batchListItem.active {
  border-color: var(--accent, currentColor);
}

/* Batch ticket scan in progress: banner, spinner, and the placeholder list row. */
.batchTicketLoading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
}

.batchTicketSpinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: batchTicketSpin 0.8s linear infinite;
}

.batchTicketLoading .batchTicketSpinner {
  margin-right: 0;
}

.batchListItem.pending {
  border-style: dashed;
}

@keyframes batchTicketSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .batchTicketSpinner { animation-duration: 2.4s; }
}

/* Readings under each test: tap one to edit that test's actual slump. */
.batchReadings {
  display: grid;
  gap: 4px;
  margin: 4px 0 10px 12px;
}

.batchReadingItem {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 6px 8px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bmAdvancedToggle:hover {
  border-color: var(--border2);
}

.bmAdvancedToggle svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text2);
  transition: transform 120ms ease;
}

.bmAdvancedToggle.open svg {
  transform: rotate(90deg);
}

.bmAdvancedToggleText {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.bmAdvancedToggleTitle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
}

.bmAdvancedOptional {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--text2);
}

.bmAdvancedToggleSummary {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  color: var(--text2);
}

/* An unstated ratio reads as absent, not as a value. */
.bmRatioBadge.muted {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--text3);
  font-weight: 500;
}

/* The sensor is THE way in, so its button is deliberately outsized next to everything
   else on the card — taller, larger type, and an accent-tinted shadow that lifts it off
   the surface. Scoped to the front door (welcome + signed-in launch); the ordinary
   sign-in submit stays a normal .authSubmitBtn. */
.frontDoorBtn {
  min-height: 52px;
  padding: 14px 18px;
  font-size: 16px;
  border-radius: var(--r);
  box-shadow: 0 2px 10px rgba(55, 171, 191, 0.35);
}
.frontDoorBtn:disabled {
  box-shadow: none;
}

/* First run: the sensor is the path. An email login is for the owner who set the account
   up, so it sits under the primary as a quiet link rather than a peer button.
   DELIBERATE rule-11 exception (amber = watch/warning): the owner asked for this link in
   the palette's yellow, and --amber is the only one. It is a nav link, not a status, so
   do NOT copy this pattern to anything that could be read as a warning. */
.welcomeAltLogin {
  margin-top: 4px;
  color: var(--amber);
  font-size: 12px;
}

/* Names the mechanism above the button it describes — "connect to sensor" as the way INTO
   an app is unusual enough to be worth one line on the most-seen screen in the app. */
.welcomeNote {
  margin: 0;
}

.batchReadingItem span,
.batchReadingItem strong {
  font-size: 12px;
}

.batchReadingItem span {
  color: var(--text2);
}

.batchReadingSlump {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

/* A reading row: tap the row to edit its test's slump, or use the trash button to delete the reading. */
.batchReadingRow {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.batchReadingRow .batchReadingItem {
  flex: 1;
}

.batchReadingDelete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.batchReadingDelete svg {
  width: 14px;
  height: 14px;
}
