/* MZ Agropecuario — tokens and BentoFlex components.
   One accent (brand orange), brand forest green as ink and as the dark theme's ground.
   Dark is its own theme, not an inversion. AA contrast everywhere, no text under 13px. */
:root {
  --bg: #eef2ee;
  --surface: #ffffff;
  --surface-2: #f4f7f3;
  --fg: #0b2915;
  --muted: #4d5f52;
  --line: rgba(11, 41, 21, 0.14);
  --accent: #9f5c20;            /* orange ink for text on light grounds (5.2:1) */
  --accent-fill: #d57c2b;       /* brand orange as a fill, with --on-accent text (5.0:1) */
  --on-accent: #0b2915;
  --accent-soft: rgba(213, 124, 43, 0.14);
  --brand: #0b2915;
  --good: #2f7a3a; --warn: #8a5300; --bad: #a3321f;
  --t-fung: #2463a6; --t-ins: #b4431f; --t-nem: #7a5230; --t-bac: #0f7a73; --t-herb: #7a6a00;
  --t-fol: #3f8a2e; --t-coad: #6b4fa0; --t-org: #2f6b4f; --t-fert: #8a5a12; --t-none: #6a716c;
  --sky-top: #cfe6f2; --sky-bottom: #eef6ee; --soil: #3d2b22; --soil-deep: #2a1d17; --soil-fleck: #5a4033; --grass: #4d8a3c;
  --r-tray: 14px; --r-card: 22px; --r-pill: 999px;
  --font-display: "Jost", "Futura", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-data: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* motion tokens: one curve, a few durations (content motion — crop sway, the grow time-lapse — keeps its own curve) */
  --d-press: .12s; --d-fade: .2s; --d-ui: .26s; --d-enter: .8s; --stagger: .03s;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #06140b; --surface: #0d2115; --surface-2: #122a1b; --fg: #e7efe8; --muted: #9fb2a4; --line: rgba(231, 239, 232, 0.14);
    --accent: #e8913f; --accent-fill: #e8913f; --on-accent: #06140b; --accent-soft: rgba(232, 145, 63, 0.16); --brand: #06140b;
    --good: #7cc47f; --warn: #f0b458; --bad: #f08a73;
    --t-fung: #7fb1ea; --t-ins: #f0916f; --t-nem: #cfa47c; --t-bac: #5fcac1; --t-herb: #d9c54a;
    --t-fol: #8fd07a; --t-coad: #b9a2e6; --t-org: #7cc4a0; --t-fert: #e0b060; --t-none: #a9b0ab;
    --sky-top: #1c2f3d; --sky-bottom: #24362d; --soil: #2e211a; --soil-deep: #1d1511; --soil-fleck: #4a352a; --grass: #3f7a33;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #06140b; --surface: #0d2115; --surface-2: #122a1b; --fg: #e7efe8; --muted: #9fb2a4; --line: rgba(231, 239, 232, 0.14);
  --accent: #e8913f; --accent-fill: #e8913f; --on-accent: #06140b; --accent-soft: rgba(232, 145, 63, 0.16); --brand: #06140b;
  --good: #7cc47f; --warn: #f0b458; --bad: #f08a73;
  --t-fung: #7fb1ea; --t-ins: #f0916f; --t-nem: #cfa47c; --t-bac: #5fcac1; --t-herb: #d9c54a;
  --t-fol: #8fd07a; --t-coad: #b9a2e6; --t-org: #7cc4a0; --t-fert: #e0b060; --t-none: #a9b0ab;
  --sky-top: #1c2f3d; --sky-bottom: #24362d; --soil: #2e211a; --soil-deep: #1d1511; --soil-fleck: #4a352a; --grass: #3f7a33;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* component display rules must never un-hide an element */
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent-fill); outline-offset: 2px; }
.tnum { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }

/* Buttons: exactly one filled action per view; the rest are tinted. 44px targets, press state. */
.btn { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--accent-soft); color: var(--fg); font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform var(--d-press) var(--ease); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.fill { background: var(--accent-fill); color: var(--on-accent); }
.btn.quiet { background: transparent; border: 1px solid var(--line); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:active { transform: scale(.94); }

.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.pill.good { color: var(--good); } .pill.warn { color: var(--warn); } .pill.bad { color: var(--bad); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; display: inline-block; }

input:not([type]), input[type=text], input[type=password], input[type=email], input[type=tel], input[type=url], input[type=date], input[type=number], input[type=search], select, textarea {
  min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 12px; width: 100%; }
textarea { padding: 10px 12px; min-height: 96px; resize: vertical; }
label.f { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
label.f span.h { font-weight: 400; color: var(--muted); font-size: 13px; }

.demo-banner { background: var(--accent-fill); color: var(--on-accent); text-align: center; font-size: 13px; font-weight: 600; padding: 6px 16px; }

/* Brand lockup */
.lockup { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; }
.lockup img, .lockup svg { height: 26px; width: auto; }
.lockup .wm { font-family: var(--font-display); font-weight: 500; font-size: 13px; letter-spacing: .42em; }

table.rows { width: 100%; border-collapse: collapse; font-size: 14px; }
table.rows th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
table.rows td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.rows td.num .muted, table.rows td.num .pill { font-family: var(--font-body); }
table.rows tr.click { cursor: pointer; }
table.rows tr.click:hover td { background: var(--surface-2); }
table.rows td.num, table.rows th.num { text-align: right; font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }

/* shared keyframes live here so the reduced-motion versions below win over them */
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
@keyframes grow { from { transform: scale(.985); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
@keyframes stepin { from { opacity: 0; transform: translateX(var(--dx, 12px)); } }
@keyframes fillin { from { transform: scaleX(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes draw2 { 0% { stroke-dashoffset: 1; opacity: 0; } 1% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
.done .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .5s var(--ease) forwards; }
.done .draw.d2 { animation: draw2 var(--d-ui) var(--ease) .32s both; }
/* reduced motion: movement becomes a fade, never a cut (doctrine) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  @keyframes rise { from { opacity: 0; } }
  @keyframes grow { from { opacity: 0; } }
  @keyframes stepin { from { opacity: 0; } }
  @keyframes fillin { from { opacity: 0; } }
  .crop-live .sway, .dots i, #mic.rec { animation: none !important; }
  .done .draw, .done .draw.d2 { animation: fade var(--d-ui) var(--ease) backwards !important; stroke-dashoffset: 0 !important; opacity: 1; }
}

/* Crop illustrations: foliage sways gently in the live cards (never in thumbnails); reduced motion stops it (rule above). */
.crop-live .sway { animation: sway 5.5s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
@keyframes sway { from { transform: rotate(-1.4deg); } to { transform: rotate(1.4deg); } }
.crop-fade { animation: cropfade var(--d-enter) var(--ease) both; }
@keyframes cropfade { from { opacity: 0; } to { opacity: 1; } }
.gbtn { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 18px 0 14px; border-radius: 999px; background: #fff; color: #1f1f1f;
  border: 1px solid #747775; font: 600 15px/1 var(--font-body); text-decoration: none; }
.gbtn:hover { background: #f2f2f2; } .gbtn:active { transform: scale(.97); }

/* press states on every tappable control (.97 text, .94 icons) */
.mini, .tile, .chip, .pcard, .rpill, .seg button, .facetabs button, .sugg button, .add, .photo-btn,
.stepper button, .dose button, .icon-btn { transition: transform var(--d-press) var(--ease); }
.mini:active, .tile:active, .chip:active, .pcard:not([disabled]):active, .rpill:active, .seg button:active,
.facetabs button:active, .sugg button:active, .add:active, .photo-btn:active { transform: scale(.97); }
.stepper button:active, .dose button:active, .icon-btn:active { transform: scale(.94); }
.step-in { animation: stepin var(--d-ui) var(--ease) backwards; }
.step-in[data-dir="b"] { --dx: -12px; }
.steps i { transform-origin: left center; }
.step-in[data-dir="f"] .steps i.now { animation: fillin var(--d-ui) var(--ease) backwards; }
.chart rect.b { transform-box: fill-box; transform-origin: 50% 100%; }

/* Inventario forms (web/assets/stock.js), shared by the admin tray and the bodega page */
.stkhead h2 { font-size: 24px; } .stkhead p { margin: 6px 0 0; font-size: 14px; max-width: 62ch; }
.stkform { margin-top: 4px; }
.stklines { display: grid; gap: 10px; }
.stkline { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stkcount .stkline { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.stkline .icon-btn { align-self: end; }
.stkline.bad { border-color: var(--bad); }
.stkdesc { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); min-width: 0; }
.stkdesc > span:last-child { overflow-wrap: anywhere; }
.stkchk { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; font-weight: 600; color: var(--fg); white-space: nowrap; }
.stkchk input { width: 20px; height: 20px; }
.stkleft { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted); min-height: 0; }
.stkwarn { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; }
.stkleft:empty { display: none; } .stkleft.warn { color: var(--warn); }
.stkbar { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
input[readonly] { background: var(--surface-2); }
/* what one unit is («pinta», 250 ml; Otto 4 Nov) — bu-; a shelf to pick or name — bs-; a new product from the bodega — bn- */
.bu-each { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 10px; align-items: end; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--accent-fill); background: var(--surface-2); }
.bu-each > label.f:nth-of-type(2) { grid-column: 2; grid-row: 2; margin: 0; }
.bu-h { grid-column: 1 / -1; margin: 0; font-weight: 600; font-size: 14px; }
.bu-each > label.f:first-of-type { grid-row: 2 / 4; }
.bu-sz { display: flex; gap: 6px; min-width: 0; } .bu-sz input { flex: 1 1 72px; min-width: 64px; } .bu-sz select { flex: 1 1 auto; min-width: 0; }
.bu-each > .bu-sz { grid-column: 2; grid-row: 3; }
.bu-note { grid-column: 1 / -1; margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.bs-pick { display: grid; gap: 4px; min-width: 0; } .bs-pick > label.f { margin: 0; } .bs-newbox { display: grid; gap: 4px; } .bs-newbox[hidden] { display: none; }
.bs-shelf { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 15px; }
.bs-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; flex-basis: 100%; } .bs-form[hidden] { display: none; } .bs-form .bs-pick { flex: 1 1 220px; }
.bs-name { display: grid; gap: 4px; max-width: 460px; } .bs-name .btn { flex: none; }
.bs-rm { display: grid; gap: 8px; justify-items: start; } .bs-rm .bs-form { display: grid; gap: 6px; justify-items: start; width: 100%; max-width: 520px; } .bs-rm .bs-form[hidden] { display: none; }
.bs-rm input { width: 100%; } .bs-rmnote { margin: 0; font-size: 14px; color: var(--muted); }
.bs-err:empty { display: none; } .bs-err { flex-basis: 100%; margin: 0; }
.bn-form { align-items: start; }
.bn-how { border: 0; padding: 0; margin: 0; min-width: 0; } .bn-how legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 6px; }
.bn-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.bn-opt { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 600; }
.bn-opt:has(input:checked) { border-color: var(--accent-fill); box-shadow: 0 0 0 1px var(--accent-fill); }
.bn-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent-fill); }
.bn-count { display: grid; gap: 4px; max-width: 420px; } .bn-count[hidden] { display: none; }
@media (max-width: 560px) {
  .bu-each { grid-template-columns: minmax(0, 1fr); } .bu-each > label.f:first-of-type, .bu-each > label.f:nth-of-type(2), .bu-each > .bu-sz { grid-column: 1; grid-row: auto; }
  .stkline, .stkcount .stkline { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
  .stkcount .stkline { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stkline > label:first-of-type { grid-column: 1 / -1; }
}
.stkhead { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
/* the count: a compact sheet, one line per product (188 products must stay scannable) */
.stkcount { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stkcount .cnthead, .stkline.cnt { display: grid; grid-template-columns: minmax(0, 1fr) 140px 110px; gap: 10px; align-items: center; padding: 8px 12px; }
.stkcount .cnthead { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.stkline.cnt { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.stkline.cnt:last-of-type { border-bottom: 0; }
.stkline.cnt .cnm { font-weight: 600; font-size: 15px; display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; } .stkline.cnt .cnm small { font-weight: 400; font-size: 13px; color: var(--muted); }
.stkcount #snone { padding: 12px; margin: 0; }
@media (max-width: 560px) { .stkcount .cnthead, .stkline.cnt { grid-template-columns: minmax(0, 1fr) 96px 84px; gap: 8px; padding: 8px 10px; } }

input[type=checkbox], input[type=radio] { accent-color: var(--accent-fill); }  /* one accent, never the browser's red or blue */
table.rows td.dt { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* File pickers in Spanish whatever the browser's language (the native button says «Choose File» in an English
   browser): the real input covers the box, invisible, so click, keyboard and screen readers still use it. */
.filepick { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; max-width: 100%; font-weight: 400; }
.filepick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.filepick .fpbtn { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 14px; color: var(--fg); }
.filepick .fpname { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.filepick:focus-within .fpbtn { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Bodega: bullet gauges (fill = on the shelf, whole bar = since the last count, tick = minimum) */
.gauge { position: relative; display: block; height: 10px; border-radius: 5px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: visible; }
.gauge.big { height: 18px; border-radius: 9px; }
.gauge i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; transition: width var(--mo-ui, .3s) ease; }
.gauge b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--fg); border-radius: 1px; }
.gauge.unk { background: repeating-linear-gradient(-45deg, var(--surface-2) 0 5px, var(--line) 5px 7px); }
/* El furgón (web/assets/furgon.js): the bodega as an isometric cutaway and one case per kind of product */
.fg { display: grid; gap: 14px; }
.fg-cases { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.fg-floor { fill: var(--surface-2); stroke: var(--line); }
.fg-wall { fill: color-mix(in srgb, var(--fg) 9%, var(--surface)); stroke: var(--line); } .fg-wall2 { fill: color-mix(in srgb, var(--fg) 14%, var(--surface)); }
.fg-rib2 { stroke: var(--line); } .fg-frame { fill: none; stroke: color-mix(in srgb, var(--fg) 40%, transparent); stroke-width: 2; stroke-linejoin: round; }
.fg-shade { filter: brightness(.78); } .fg-lit { filter: brightness(1.15); }
.fg-key { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin: 0; font-size: 13px; color: var(--muted); }
.fg-key span { display: inline-flex; align-items: center; gap: 6px; }
.fg-k { width: 18px; height: 18px; border-radius: 4px; display: inline-block; border: 1px solid var(--line); font: 700 13px/16px var(--font-display); text-align: center; font-style: normal; }
.fg-k-full { background: var(--t-fung); } .fg-k-part { background: linear-gradient(to top, var(--t-fung) 45%, var(--surface) 45%); }
.fg-k-ghost { border: 1.5px dashed var(--muted); } .fg-k-alert { background: var(--bad); color: var(--surface); border-color: var(--bad); border-radius: 50%; }
.fg-case.fg-flash { animation: fgflash 1.2s ease; } @keyframes fgflash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent-fill); } 100% { box-shadow: 0 0 0 0 transparent; } }
.fg-case header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 2px 10px; font-size: 15px; }
.fg-dot { width: 12px; height: 12px; border-radius: 3px; background: var(--c); } .fg-count { color: var(--muted); font-size: 13px; } .fg-count em { color: var(--bad); font-style: normal; font-weight: 600; }
.fg-glass { fill: color-mix(in srgb, var(--surface) 70%, transparent); stroke: color-mix(in srgb, var(--fg) 45%, transparent); stroke-width: .8; }
.fg-side { fill: color-mix(in srgb, var(--fg) 6%, var(--surface)); }
.fg-rim { fill: color-mix(in srgb, var(--surface) 85%, var(--fg) 6%); stroke: color-mix(in srgb, var(--fg) 45%, transparent); stroke-width: .8; }
.fg-liqtop { filter: brightness(1.2); } .fg-cap { fill: color-mix(in srgb, var(--fg) 70%, transparent); } .fg-handle { fill: none; stroke: color-mix(in srgb, var(--fg) 45%, transparent); stroke-width: 2; }
.fg-rib { fill: none; stroke: color-mix(in srgb, var(--fg) 30%, transparent); stroke-width: .8; }
.fg-bag { stroke: color-mix(in srgb, #000 30%, transparent); stroke-width: .8; } .fg-bag.fg-part { opacity: .55; }
.fg-stitch { fill: none; stroke: color-mix(in srgb, #fff 55%, transparent); stroke-width: .9; stroke-dasharray: 2 2; }
.fg-ghost * { fill: none !important; stroke: var(--muted) !important; stroke-dasharray: 3 2; }
.fg-q { font: 700 13px var(--font-display); fill: var(--muted); text-anchor: middle; } .fg-empty { font: 600 13px var(--font-body); fill: var(--muted); text-anchor: middle; }
.fg-alert circle { fill: var(--bad); } .fg-alert text { font: 700 13px var(--font-display); fill: #fff; text-anchor: middle; }
@media (prefers-reduced-motion: no-preference) {
  .fg-liq { transform-box: fill-box; transform-origin: 50% 100%; animation: fgrise .9s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes fgrise { from { transform: scaleY(0); } }
}
.fg-pres { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.fg-pchips { display: flex; flex-wrap: wrap; gap: 6px; } .fg-pchips .chip { min-height: 44px; }
.fg-pform { display: flex; gap: 8px; flex-wrap: wrap; } .fg-pform input { flex: 1; min-width: 140px; min-height: 44px; } .fg-perr:empty { display: none; }
.fg-cnt { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; }
.fg-step { display: flex; align-items: center; gap: 8px; } .fg-stepl { font-weight: 600; } .fg-step .btn { min-width: 48px; font-size: 20px; }
.fg-step input { width: 84px; min-height: 44px; font: 600 18px var(--font-data); text-align: center; } .fg-total { margin: 0; } .fg-cnt .btn.fill { justify-self: start; }
.fg-pchips .chip[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); font-weight: 600; }
.fg-note { margin: 0 0 12px; font-size: 14px; }
/* El furgón v2 (12 Oct): the truck and the cases on the left, filters + inspector on the right */
.fg-two { container-type: inline-size; } .fg-in { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.fg-aside { position: sticky; top: 84px; display: grid; gap: 14px; max-height: calc(100dvh - 100px); overflow: auto; padding: 6px; }
.fg-aside .stkbar, .fg-aside .tools { display: grid; gap: 8px; justify-content: stretch; margin: 0; } .fg-aside .rpills, .fg-aside .seg { display: flex; flex-wrap: wrap; gap: 6px; }
.fg-aside select, .fg-aside input[type=search] { width: 100%; min-height: 44px; }
.fg-truck { width: 100%; max-width: 1100px; max-height: 560px; height: auto; justify-self: center; overflow: visible; }
.fg-ground { fill: color-mix(in srgb, var(--fg) 6%, transparent); }
.fg-body { fill: var(--fg-truck, #1f5a36); stroke: color-mix(in srgb, #000 30%, transparent); stroke-width: .7; } .fg-body.fg-fx { filter: brightness(.8); } .fg-body.fg-fz { filter: brightness(1.18); }
.fg-window { fill: color-mix(in srgb, #9fd3e8 55%, var(--surface)); stroke: color-mix(in srgb, #000 30%, transparent); }
.fg-door { fill: none; stroke: color-mix(in srgb, #000 35%, transparent); stroke-width: .9; } .fg-mark { fill: var(--accent-fill); }
.fg-chassis { fill: #2a2f2c; } .fg-floor { fill: color-mix(in srgb, #b68a55 30%, var(--surface)); stroke: var(--line); } .fg-plank { stroke: color-mix(in srgb, #000 12%, transparent); stroke-width: .6; }
.fg-sten { font: 700 13px var(--font-display); letter-spacing: .06em; text-transform: uppercase; fill: color-mix(in srgb, var(--fg) 62%, transparent); } .fg-stn { font-family: var(--font-data); fill: var(--fg); }
.fg-band { opacity: .9; } .fg-post { stroke: color-mix(in srgb, #000 25%, transparent); stroke-width: .5; }
.fg-shelf { fill: color-mix(in srgb, var(--fg) 22%, var(--surface)); stroke: color-mix(in srgb, #000 25%, transparent); stroke-width: .5; } .fg-shelf.fg-fz { fill: color-mix(in srgb, var(--fg) 12%, var(--surface)); }
.fg-pallet { fill: #a8814f; stroke: color-mix(in srgb, #000 30%, transparent); stroke-width: .5; } .fg-pallet.fg-fx { filter: brightness(.8); }
.fg-tyre { fill: #1c201e; } .fg-hub { fill: #8d958f; } .fg-lamp { fill: #d9452b; }
.fg-sec { cursor: pointer; outline: none; } .fg-sec .fg-ti { transition: transform var(--d-press, .15s) ease; }
.fg-sec.on .fg-ti, .fg-sec:hover .fg-ti, .fg-sec:focus-visible .fg-ti { transform: translateY(-3px); } .fg-sec:focus-visible .fg-sten, .fg-sec.on .fg-sten { fill: var(--fg); }
.fg-case { flex: 1 1 100%; min-width: 0; border-radius: 18px; padding: 12px 14px 14px; border: 2px solid color-mix(in srgb, #000 35%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, #3b2a1a 55%, var(--surface)), color-mix(in srgb, #2a1d12 60%, var(--surface))); box-shadow: inset 0 0 0 3px color-mix(in srgb, #c9a46a 25%, transparent); }
.fg-case header { color: #f3ead9; } .fg-case .fg-count { color: #d8c7a8; } .fg-case .fg-count em { color: #ffb4a3; }
.fg-grid { --cell: 78px; display: grid; grid-template-columns: repeat(auto-fill, var(--cell)); grid-auto-rows: var(--cell); grid-auto-flow: row; gap: 0; border-radius: 8px;
  background-color: #10161f; background-image: linear-gradient(rgba(150, 180, 220, .14) 1px, transparent 1px), linear-gradient(90deg, rgba(150, 180, 220, .14) 1px, transparent 1px); background-size: var(--cell) var(--cell); border: 1px solid rgba(150, 180, 220, .25); }
.fg-item { position: relative; display: block; padding: 0; margin: 2px; border-radius: 6px; border: 1px solid rgba(150, 180, 220, .28); background: radial-gradient(circle at 50% 40%, rgba(150, 180, 220, .16), rgba(10, 14, 20, .2)); color: #eef3f8; overflow: hidden; text-align: left; --surface: #1a2330; --fg: #eef3f8; --muted: #a9b6c6; }
.fg-item:hover, .fg-item:focus-visible { border-color: var(--accent-fill); box-shadow: 0 0 0 2px var(--accent-fill) inset; outline: none; }
.fg-item svg { position: absolute; inset: 4px 4px 22px; width: calc(100% - 8px); height: calc(100% - 26px); max-width: none; }
.fg-item .fg-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 6px; font-size: 13px; font-weight: 600; background: rgba(6, 10, 16, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fg-item .fg-qty { position: absolute; left: 6px; top: 4px; font: 600 13px var(--font-data); color: #d9e4f1; }
.fg-x { position: absolute; right: 5px; bottom: 22px; font: 700 15px var(--font-data); color: #9cf28a; text-shadow: 0 1px 2px #000; }
.fg-bang { position: absolute; left: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: #e0533a; color: #fff; font: 700 13px/20px var(--font-display); text-align: center; }
.fg-item .fg-qty + .fg-bang, .fg-bang + .fg-name + .fg-qty { top: 4px; } .fg-item:has(.fg-bang) .fg-qty { left: 28px; }
.fg-gh { background: transparent; border-style: dashed; }
.fg-bajo { border-color: #e7a33b; } .fg-agotado, .fg-negativo { border-color: #e0533a; }
.fg-insp { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--surface-2); display: grid; gap: 6px; align-content: start; }
.fg-insp h3 { margin: 0; font-size: 18px; } .fg-iart { width: 100%; height: 130px; } .fg-itype { margin: 0; display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 14px; }
.fg-iqty { margin: 2px 0 0; font: 700 22px var(--font-data); } .fg-isub, .fg-ihint { margin: 0; color: var(--muted); font-size: 14px; }
.fg-insp dl { margin: 6px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; } .fg-insp dt { font-size: 13px; color: var(--muted); } .fg-insp dd { margin: 0; font: 600 15px var(--font-data); }
.fg-insp .btn { justify-self: start; }
.fg-types { display: grid; gap: 4px; } .fg-types button { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 8px; align-items: center; min-height: 40px; padding: 4px 10px; border-radius: 10px; border: 1px solid transparent; background: none; color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.fg-types button:hover, .fg-types button:focus-visible { border-color: var(--line); background: var(--surface-2); } .fg-types .tnum { color: var(--muted); }
.fg-aside .fg-key { justify-content: flex-start; }
@media (max-width: 600px) { .fg-grid { --cell: 66px; } }
.fg-post { fill: color-mix(in srgb, var(--fg) 45%, var(--surface)); } .fg-postc.fg-fx { filter: brightness(.8); }
.fg-sign line { stroke: color-mix(in srgb, var(--fg) 40%, transparent); stroke-width: 1; } .fg-sign rect { fill: var(--surface); stroke: var(--line); }
.fg-sign text { font: 600 13px var(--font-body); fill: var(--fg); text-anchor: middle; }
.fg-sec.on .fg-sign rect:first-of-type, .fg-sec:hover .fg-sign rect:first-of-type, .fg-sec:focus-visible .fg-sign rect:first-of-type { stroke: var(--accent-fill); stroke-width: 2; }
.fg-shelf { fill: color-mix(in srgb, var(--fg) 34%, var(--surface)); } .fg-shelf.fg-fz { fill: color-mix(in srgb, var(--fg) 20%, var(--surface)); }
.fg-truck .fg-frame { stroke: color-mix(in srgb, var(--fg) 22%, transparent); stroke-width: 1.2; }
.fg-case { background: linear-gradient(180deg, #3a2a1b, #281c11); border-color: #1a120b; box-shadow: inset 0 0 0 3px rgba(201, 164, 106, .28), 0 2px 0 rgba(0, 0, 0, .15); }
.fg-ghost * { vector-effect: non-scaling-stroke; stroke-width: 1.3px; }
.fg-item.fg-big svg { inset: 24px 6px 24px; height: calc(100% - 48px); }
.fg-truckwrap { display: grid; justify-items: center; } .fg-grid { max-width: 100%; }
.fg-sec:focus .fg-sign rect:first-of-type { stroke: var(--accent-fill); stroke-width: 2.5; } .fg-sec:focus .fg-ti { transform: translateY(-3px); }
@media (hover: none) { .fg-two .fg-insp { display: none; } }
/* narrow (the bodega page, phones): one column, filters first, kinds as a scrolling strip, the truck swipes sideways */
@container (max-width: 820px) {
  .fg-two .fg-in { grid-template-columns: minmax(0, 1fr); } .fg-two .fg-aside { position: static; max-height: none; order: -1; overflow: visible; }
  .fg-two .fg-insp { display: none; }
  .fg-two .fg-types { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; } .fg-two .fg-types button { flex: none; border-color: var(--line); grid-template-columns: 12px auto auto auto; }
  .fg-two .fg-sign { display: none; }  /* too small to read at this width: the kinds strip above carries the names and counts */
}
.fg-aside { grid-template-columns: minmax(0, 1fr); } .fg-aside > *, #fgside { min-width: 0; } #fgside { display: grid; gap: 14px; }
/* kept from v1, still used */
.fg-zurg { color: var(--bad); font-weight: 600; font-size: 13px; } .fg-case { scroll-margin-top: 80px; }
.fg-ghost .fg-q { fill: var(--muted) !important; stroke: none !important; stroke-dasharray: none; }
.fg-more rect { fill: var(--fg); } .fg-more text { font: 700 13px var(--font-data); fill: var(--surface); text-anchor: middle; }
.fg-bang { background: #b8321c; } .fg-two .fg-types { padding: 4px 2px; }

.fg-aside .stkbar select, .fg-aside .stkbar input[type=search], .fg-aside .tools input[type=search] { width: 100%; max-width: none; }
/* Conteo por estante: a full-screen walk through the shelves */
body.ct-open { overflow: hidden; }
.ct-dlg { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, #000 45%, transparent); display: grid; place-items: stretch; padding: 16px; }
.ct-box { background: var(--bg, var(--surface)); color: var(--fg); border-radius: 20px; border: 1px solid var(--line); display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); overflow: hidden; max-width: 1280px; width: 100%; margin: 0 auto; }
.ct-head { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; padding: 16px 20px 8px; } .ct-head > div { flex: 1 1 320px; } .ct-head h2 { margin: 0; font-size: 22px; } .ct-head p { margin: 4px 0 0; font-size: 14px; }
.ct-date input { min-height: 44px; }
.ct-prog { height: 8px; margin: 4px 20px 0; border-radius: 99px; background: var(--surface-2); overflow: hidden; } .ct-prog span { display: block; height: 100%; background: var(--good); border-radius: 99px; transition: width .3s ease; }
.ct-progt { margin: 6px 20px 10px; font-size: 14px; color: var(--muted); } .ct-progt b { color: var(--fg); }
.ct-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 0; border-top: 1px solid var(--line); }
.ct-map { overflow: auto; padding: 14px; display: flex; flex-wrap: wrap; gap: 12px; align-content: start; border-right: 1px solid var(--line); background: var(--surface-2); }
.ct-col { display: grid; gap: 6px; align-content: start; } .ct-col > b { font-size: 13px; color: var(--muted); font-weight: 600; }
.ct-cell { display: grid; justify-items: center; min-width: 52px; min-height: 52px; padding: 4px 6px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.ct-cell span { font: 700 15px var(--font-display); } .ct-cell small { font: 500 13px var(--font-data); color: var(--muted); }
.ct-cell.part { border-color: var(--warn); } .ct-cell.done { background: color-mix(in srgb, var(--good) 22%, var(--surface)); border-color: var(--good); }
.ct-cell.now { outline: 3px solid var(--accent-fill); outline-offset: 1px; }
@media (prefers-reduced-motion: no-preference) { .ct-cell.done { animation: ctpop .35s ease; } @keyframes ctpop { 50% { transform: scale(1.08); } } }
.ct-main { overflow: auto; padding: 16px 20px 24px; min-height: 0; }
.ct-shelf header { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; } .ct-shelf h3 { margin: 0; font-size: 20px; } .ct-shelf header p { flex-basis: 100%; margin: 0; font-size: 14px; }
.ct-ok { color: var(--good); }
.ct-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ct-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ct-row.on { border-color: color-mix(in srgb, var(--good) 60%, var(--line)); box-shadow: inset 4px 0 0 var(--good); }
.ct-art .fg-icon { width: 52px; height: 56px; } .ct-id { display: grid; gap: 2px; min-width: 0; } .ct-id b { font-size: 16px; overflow-wrap: anywhere; } .ct-id small { font-size: 13px; color: var(--muted); }
.ct-id select { min-height: 40px; margin-top: 4px; max-width: 100%; } .ct-placed { font-size: 13px; color: var(--good); }
.ct-newloc { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; } .ct-newloc input { min-height: 40px; flex: 1 1 140px; min-width: 0; } .ct-newloc .btn { min-height: 40px; }
.ct-add { margin-top: 10px; } .ct-in .bu-each { margin-top: 8px; } .ct-new .bn-form { margin-top: 8px; }
.ct-in { display: grid; gap: 6px; justify-items: start; }
.ct-step { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .ct-step .btn { min-width: 46px; min-height: 44px; font-size: 20px; padding: 0; }
.ct-step input { width: 72px; min-height: 44px; font: 600 18px var(--font-data); text-align: center; } .ct-k { font-size: 14px; color: var(--muted); }
.ct-parts, .ct-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .ct-parts .chip, .ct-acts .chip { min-height: 40px; }
.ct-parts .chip[aria-pressed="true"], .ct-acts .chip[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); font-weight: 600; }
.ct-q { display: flex; gap: 6px; } .ct-q input { width: 110px; min-height: 44px; font: 600 17px var(--font-data); } .ct-q select { min-height: 44px; }
.ct-link { background: none; border: 0; padding: 6px 2px; min-height: 32px; color: var(--accent); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.ct-out { font: 600 14px var(--font-data); color: var(--muted); } .ct-row.on .ct-out { color: var(--fg); }
.ct-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; } .ct-nav .btn { min-height: 48px; }
.ct-sum { list-style: none; margin: 0 0 12px; padding: 0; display: grid; } .ct-sum li { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.ct-d { font: 600 13px var(--font-data); color: var(--muted); } .ct-d.neg { color: var(--bad); } .ct-d.pos { color: var(--good); }
@media (max-width: 760px) {
  .ct { padding: 0; } .ct-box { border-radius: 0; border: 0; } .ct-head { padding: 12px 16px 6px; } .ct-prog { margin: 4px 16px 0; } .ct-progt { margin: 6px 16px 8px; }
  .ct-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .ct-map { flex-wrap: nowrap; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .ct-main { padding: 12px 16px 20px; } .ct-row { grid-template-columns: 44px minmax(0, 1fr); } .ct-art .fg-icon { width: 40px; height: 44px; } .ct-in { grid-column: 1 / -1; }
  .ct-sum li { grid-template-columns: minmax(0, 1fr) auto; } .ct-sum li span:nth-child(2) { display: none; }
}

.ct-toast { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; z-index: 70; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
@media (prefers-reduced-motion: no-preference) { .ct-toast { animation: cttoast .25s ease both; } @keyframes cttoast { from { opacity: 0; transform: translate(-50%, 8px); } } }
@media (max-width: 760px) { .ct-head p { display: none; } .ct-head h2 { font-size: 19px; } .ct-head { align-items: center; } .ct-date { flex: 1; } }
.ct-row.warn { border-color: color-mix(in srgb, var(--warn) 65%, var(--line)); box-shadow: inset 4px 0 0 var(--warn); } .ct-row.warn .ct-out { color: var(--warn); }
.ct-cells { display: grid; gap: 6px; }
@media (max-width: 760px) { .ct-col { display: grid; grid-auto-flow: row; gap: 4px; } .ct-cells { display: flex; gap: 6px; } .ct-sum li { grid-template-columns: minmax(0, 1fr) auto auto; } }
/* the zoom into one rack (Adrian, 13 Oct): the other racks step back while the camera flies in, then the rack opens front-on */
.fg-stage { display: grid; overflow: hidden; }
.fg-truck .fg-sec { transition: opacity .35s ease; } .fg-truck.fg-zoomed .fg-sec:not(.fg-focus) { opacity: .1; } .fg-truck.fg-zoomed .fg-sign { opacity: 0; transition: opacity .2s; }
.fg-rack { display: grid; gap: 12px; }
.fg-rack.fg-enter { animation: fgrackin .42s cubic-bezier(.2, .8, .2, 1) both; } @keyframes fgrackin { from { opacity: 0; transform: scale(.94) translateY(10px); } }
.fg-rackh { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .fg-racht { flex: 1 1 220px; display: grid; gap: 2px; }
.fg-racht h3 { margin: 0; font-size: 20px; display: flex; gap: 8px; align-items: center; } .fg-racht h3:focus { outline: none; } .fg-racht h3:focus-visible { outline: 3px solid var(--accent-fill); outline-offset: 3px; }
.fg-racht .muted { font-size: 14px; } .fg-racht em { color: var(--bad); font-style: normal; font-weight: 600; }
.fg-unit { --row: 150px; border-radius: 14px; padding: 10px 14px 0; background: color-mix(in srgb, var(--fg) 5%, var(--surface)); border: 1px solid var(--line);
  border-left: 7px solid var(--c); border-right: 7px solid var(--c); box-shadow: inset 0 10px 18px -12px rgba(0, 0, 0, .35); }
.fg-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); grid-auto-rows: var(--row); column-gap: 8px;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--row) - 9px), color-mix(in srgb, var(--fg) 35%, var(--surface)) calc(var(--row) - 9px), color-mix(in srgb, var(--fg) 22%, var(--surface)) var(--row)); }
.fg-pal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 170px; column-gap: 8px; margin: 6px -14px 0; padding: 0 14px;
  background: linear-gradient(to bottom, transparent calc(100% - 16px), #a8814f calc(100% - 16px), #8a6a40 100%); background-size: 100% 170px; border-top: 1px dashed var(--line); }
.fg-ri { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0; padding: 4px 4px 13px; overflow: hidden; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; cursor: pointer; min-width: 0; }
.fg-ri svg { width: 100%; height: 84px; flex: none; overflow: visible; } .fg-pal .fg-ri svg { height: 104px; }
.fg-ri b { font-size: 13px; font-weight: 650; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fg-ri small { font: 500 13px var(--font-data); color: var(--muted); }
.fg-ri:hover, .fg-ri:focus-visible { background: color-mix(in srgb, var(--accent-fill) 14%, transparent); outline: none; box-shadow: inset 0 0 0 2px var(--accent-fill); }
.fg-ri .fg-x { right: 8px; bottom: 44px; color: var(--good); text-shadow: none; } .fg-ri .fg-bang { left: 6px; top: 6px; }
.fg-ri.fg-bajo small { color: var(--warn); } .fg-ri.fg-agotado small, .fg-ri.fg-negativo small { color: var(--bad); }
@media (prefers-reduced-motion: reduce) { .fg-truck .fg-sec, .fg-truck.fg-zoomed .fg-sign { transition: none; } }
@container (max-width: 820px) { .fg-two .fg-unit { --row: 132px; padding: 8px 8px 0; } .fg-two .fg-boards { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); } .fg-two .fg-pal { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin: 6px -8px 0; padding: 0 8px; } }
.fg-rack.fg-enter .fg-ri { animation: fgpop .38s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: calc(.12s + var(--i, 0) * 16ms); } @keyframes fgpop { from { opacity: 0; transform: translateY(14px) scale(.9); } }
/* Mi InTechCenter (contract v1.1–v1.6.1) */
.ic-tray { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ic-card { padding: 14px 16px; display: grid; gap: 8px; align-content: start; font-size: 14px; } .ic-card h3 { font-size: 16px; margin: 0; }
.ic-card.ic-due { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.ic-late { color: var(--bad); font-weight: 600; }
.ic-row { display: flex; gap: 8px; align-items: baseline; } .ic-row > span:first-child { flex: 1; min-width: 0; }
.ic-first { margin: 4px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
.ic-sup { display: grid; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--line); } .ic-sup .pill { justify-self: start; }
.ic-q { margin: 2px 0 0; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); font-size: 14px; }
.ic-hl { margin: 0; padding-left: 18px; }
/* opening a cycle in steps */
.cstep { display: flex; gap: 6px; list-style: none; margin: 0 0 12px; padding: 0; counter-reset: cs; flex-wrap: wrap; }
.cstep li { counter-increment: cs; display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.cstep li::before { content: counter(cs); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); font: 600 13px var(--font-data); }
.cstep li.done { color: var(--fg); } .cstep li.done::before { content: "✓"; background: color-mix(in srgb, var(--good) 22%, var(--surface)); color: var(--good); }
.cstep li.now { color: var(--fg); border-color: var(--accent-fill); font-weight: 600; } .cstep li.now::before { background: var(--accent-fill); color: var(--on-accent); }
.cwith { position: relative; } .cwithx { position: absolute; top: -4px; right: 0; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-size: 20px; cursor: pointer; }
.prepw li { grid-template-columns: 70px minmax(0, 1fr) minmax(0, .8fr); }
.pj-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; }
.pj-rate { max-width: 300px; }
.pj-cost { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface-2); }
.pj-h { margin: 0 0 6px; font-size: 16px; }
.pj-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pj-lines li, .pj-tot { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.pj-tot { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 16px; }
.pj-note { margin: 6px 0 0; font-size: 13px; }
.pj-warn { color: var(--warn); font-weight: 600; }
.em-sec { display: grid; gap: 8px; margin-top: 18px; }
.em-sec h3 { margin: 0; font-size: 17px; }
.em-sec p.muted { margin: 4px 0 0; font-size: 14px; }
.em-head { display: flex; justify-content: space-between; align-items: end; gap: 10px; flex-wrap: wrap; }
.em-rate { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.em-rate p { margin: 0; flex-basis: 100%; }
.pj-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 130px 44px; gap: 6px; margin-bottom: 6px; }
.pj-trac:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.pj-trac .pj-need { grid-column: 1 / -1; }
.pj-need { margin: 0; font-size: 14px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--line); }
/* Harvest form (Otto, 27 Oct): a box's weight beside its unit, the kilos as it's typed */
.hw-unit { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hw-kg { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; white-space: nowrap; }
.hw-kg[hidden] { display: none; }
.hw-kg .hvkg { width: 80px; }
@media (max-width: 560px) {  /* a phone: each quality on its own block, quantity and unit side by side */
  .hvlt thead { display: none; }
  .hvlt tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .hvlt td { padding: 0; border: 0; }
  .hvlt td:first-child { grid-column: 1 / -1; }
  .hvlt td:nth-child(4) { grid-column: 1 / -1; }
  .hvlt select { width: 100%; }
}
.hw-est { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface-2); display: grid; gap: 4px; }
.hw-est p { margin: 0; }
.hw-note { margin: 0; font-size: 14px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--line); }
.prepmat { display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px 44px; gap: 6px; margin-bottom: 6px; }
.seedrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, .8fr) auto 44px; gap: 8px; align-items: end; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.seedrow:has(.sr-l) { grid-template-columns: minmax(0, 1.1fr) minmax(0, .7fr) minmax(0, .7fr) minmax(0, 1fr) 44px; }
.seedrow .sr-vnew, .seedrow .sr-cnew { grid-column: 1 / -1; }
/* a seed row's density and seed lot (Otto, 27 Oct: required for carrot) */
.seedrow .sd-more { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 8px; align-items: end; }
.seedrow .sr-x { align-self: end; min-height: 44px; }
/* the lot sheet: what was sown */
.sd-list { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 4px; }
@media (max-width: 600px) { .seedrow .sd-more { grid-template-columns: minmax(0, 1fr); } }
.psdays { display: grid; grid-template-columns: repeat(2, minmax(0, 160px)); gap: 8px; }
@media (max-width: 600px) { .pj-trac:not([hidden]) { grid-template-columns: minmax(0, 1fr); } .pj-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; } .pj-row .pj-p { grid-column: 1 / -1; } .prepmat { grid-template-columns: minmax(0, 1fr) 90px; } .prepmat .pm-u { grid-column: 1; } .seedrow, .seedrow:has(.sr-l) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .seedrow .sr-x { grid-column: 2; justify-self: end; } }


/* the harvest as a pile (assets/boxstack.js): one pile per quality, stacking as it's typed */
.bx-host { --bx-ground: color-mix(in srgb, var(--fg) 12%, transparent); display: grid; gap: 6px; }
.bx-host[hidden] { display: none; }
.bx-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: center; }
.bx-pile { margin: 0; display: grid; justify-items: center; gap: 4px; max-width: 100%; }
.bx-svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.bx-pile figcaption { display: grid; justify-items: center; font-size: 14px; line-height: 1.3; text-align: center; font-variant-numeric: tabular-nums; }
.bx-kg { color: var(--muted); }
.bx-pile figcaption b { display: inline-flex; align-items: center; gap: 6px; }
.bx-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.bx-note { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  .bx-in { animation: bx-drop .5s var(--ease) both; }
  @keyframes bx-drop { from { transform: translateY(-28px); opacity: 0; } 55% { opacity: 1; } to { transform: none; opacity: 1; } }
}

/* Leer etiquetas (Otto, 4 Nov): each label photo beside what was read, to check before it's saved — lb- */
.lb-pick { display: flex; flex-wrap: wrap; gap: 8px; } .lb-pick label.btn { cursor: pointer; display: inline-flex; align-items: center; } .lb-pick label.btn.fill { color: var(--on-accent); }
.lb-pick input[type=file] { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.lb-pick label:has(+ input:focus-visible) { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.lb-prog { margin: 0; font-size: 14px; } .lb-prog:empty { display: none; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lb-item { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.lb-ph { display: block; align-self: start; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.lb-ph img { display: block; width: 100%; height: auto; max-height: 320px; object-fit: contain; }
.lb-form { align-items: start; }
.lb-now { display: block; font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 2px; overflow-wrap: anywhere; }
.lb-ref { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 14px; } .lb-ref p { margin: 0 0 4px; } .lb-ref p:last-child { margin: 0; }
.lb-keep { margin: 0; font-size: 14px; }
.lb-acts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; } .lb-err:empty { display: none; }
.lb-saved { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 14px; } .lb-saved p { margin: 4px 0 0; }
@media (max-width: 640px) { .lb-item { grid-template-columns: minmax(0, 1fr); } .lb-ph img { max-height: 240px; } }
/* Pedidos de bodega in the panel's Pedidos (Otto, 4 Nov) */
.bq-sec { display: grid; gap: 8px; margin: 4px 0 8px; } .bq-sec h3 { font-size: 17px; margin: 0; } .bq-sec > p { margin: 0; font-size: 14px; }
.bq-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bq-item { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 6px; font-size: 14px; background: var(--surface); }
.bq-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.bq-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.bq-sec details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 14px; color: var(--muted); }
/* «Quitar del catálogo» in the product's ficha */
.pr-why { border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; margin: 0; display: grid; gap: 2px; } .pr-why legend { font-weight: 650; padding: 0 4px; }
.pr-why .stkchk { white-space: normal; }
.fg-crow { display: grid; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); } .fg-crow:first-of-type { border-top: 0; padding-top: 0; }
.fg-left input { max-width: 160px; } .fg-more > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--muted); }
.fg-addsz { display: flex; gap: 8px; flex-wrap: wrap; } .fg-addsz input { flex: 1; min-width: 140px; }

/* Quién lo vende (Otto, 11 Nov): a product's suppliers, from their price lists and invoices; wh- prefix */
.wh-box { display: grid; gap: 6px; margin-top: 10px; } .wh-h { font-size: 17px; margin: 0; }
.wh-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wh-list li { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.wh-l { color: var(--fg); } .wh-p { font: 600 15px var(--font-data); } .wh-m { margin: 0; font-size: 13px; color: var(--muted); }
