/* Sticky crew bar (show data + one input) over a dense grid of road-case labels; one tap toggles. */
:root {
  --bg: #f3f4f1; --surface: #ffffff; --fg: #171a19; --muted: #6a706c; --line: #dfe2dc;
  --accent: #d9480f; --accent-fg: #ffffff;
  --go: #1f9d55; --go-bg: #eaf7ef; --go-line: #9fdcb7;
  --bad: #d63333; --bad-bg: #fdeeee; --warn: #b7791f; --warn-bg: #fdf6e7; --off-bg: #f7f8f6;
  --f-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #121514; --surface: #1b1f1d; --fg: #eef0ec; --muted: #9aa19c; --line: #2c322f;
  --accent: #ff7a3d; --accent-fg: #1a0d05;
  --go: #4cd187; --go-bg: #15291e; --go-line: #2a6b45;
  --bad: #ff6b6b; --bad-bg: #331a1a; --warn: #f0b45a; --warn-bg: #2e2412; --off-bg: #171a19; color-scheme: dark } }

* { box-sizing: border-box }
[hidden] { display: none !important }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 15px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 calc(48px + env(safe-area-inset-bottom, 0px)) }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg) }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.muted { color: var(--muted) }
.hint { margin: 0; font-size: 13px; color: var(--muted) }
body:not(.is-admin) .admin-only { display: none !important }

/* ---------- Header ---------- */
header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg);
  display: grid; gap: 12px; padding-block: 14px 12px; border-bottom: 1px solid var(--line); margin-top: env(safe-area-inset-top, 0px) }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px }
.row.end { justify-content: flex-end }
.push { margin-left: auto }
h1 { font-family: var(--f-display); font-weight: 700; font-size: 26px; letter-spacing: .02em; text-transform: uppercase; margin: 0; margin-right: auto }
h1 span { color: var(--accent) }
.sync { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted) }
.sync.ok i { background: var(--go) } .sync.warn i { background: var(--bad) }
.role { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted) }
.is-admin .role { border-color: var(--accent); color: var(--accent) }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); flex: none }

.showbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end }
.showbar .grow { flex: 1 1 260px }
#showSel { font-weight: 600 }
.show { display: grid; grid-template-columns: 160px 1fr 160px; gap: 8px }
.archivado { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); border: 1px solid var(--warn); font-size: 14px; font-weight: 600 }
.search { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--bg); font-size: 16px }
.hist-list { display: grid; gap: 6px; max-height: 55vh; overflow-y: auto }
.hist-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface) }
.hist-item b { font-family: var(--f-display); font-size: 18px; text-transform: uppercase }
.hist-item span { grid-column: 1; color: var(--muted); font-size: 13px }
.hist-item small { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--muted) }
.hist-item:hover { border-color: var(--accent) }
.field { display: grid; gap: 3px; min-width: 0 }
.field label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted) }
.field input, .field select, .omni input { width: 100%; height: 40px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 0 10px; font-size: 16px }
.field input:disabled, .field select:disabled { opacity: 1; background: transparent; border-style: dashed }
#lugar { text-transform: uppercase; font-weight: 600 }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: -12px }
.tabs button { border: 0; background: none; padding: 8px 12px 10px; font-family: var(--f-display); font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent) }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-family: var(--f-body); font-size: 12px; margin-left: 4px }
#bultosBar { margin-top: 12px }

.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; flex-wrap: wrap }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 14px; color: var(--muted) }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg) }
.seg button:disabled { cursor: default; opacity: .6 }
.omni { flex: 1 1 220px; position: relative; min-width: 0 }
.omni input { height: 42px; padding-left: 12px; padding-right: 92px }
.omni kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-family: var(--f-mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; pointer-events: none }
.btn { height: 42px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent) }
.btn.small { height: 32px; padding: 0 10px; font-size: 13px }
.btn.ghost { background: none; border-color: transparent; color: var(--muted) }
.btn.ghost.has { color: var(--accent); border-color: var(--accent) }
.btn.armed { background: var(--bad); border-color: var(--bad); color: #fff }
.btn.ghost-danger { color: var(--bad); background: none; border-color: transparent }
.btn.ghost-danger.armed { background: var(--bad); color: #fff }
.btn:disabled { opacity: .45; cursor: default }
.btn.file { cursor: pointer }

.summary { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 14px; color: var(--muted) }
.summary b { font-family: var(--f-mono); color: var(--fg); font-size: 18px; font-variant-numeric: tabular-nums }
.summary .go b { color: var(--go) } .summary .bad b { color: var(--bad) }
.progress { flex: 1 1 140px; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden }
.progress div { height: 100%; background: var(--go); transition: width .2s }
.filters { display: flex; flex-wrap: wrap; gap: 6px }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 13px; color: var(--muted) }
.chip[aria-pressed="true"] { border-color: var(--fg); color: var(--fg); font-weight: 600 }
.bulk { display: flex; gap: 6px; margin-left: auto }

/* ---------- Bultos grid ---------- */
main { padding-top: 16px }
.avisos { display: grid; gap: 6px; margin-bottom: 12px }
.aviso { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--fg); border: 1px solid var(--warn); font-size: 14px }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px }
.card { position: relative; display: grid; grid-template-rows: 1fr auto; border: 1.5px solid var(--line); background: var(--off-bg); border-radius: 12px; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; transition: transform .08s }
.card:active { transform: scale(.98) }
.card.on { border-color: var(--go-line); background: var(--go-bg) }
.card.issue { border-color: var(--bad) }
.tap { all: unset; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 14px 14px 12px; cursor: pointer; min-width: 0 }
.tap:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 10px }
.name { font-family: var(--f-display); font-weight: 700; font-size: 19px; line-height: 1.12; text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere }
.note { grid-column: 1; font-size: 13px; color: var(--muted) }
.issue .note { color: var(--bad); font-weight: 600 }
.edit { grid-row: 1 / span 2; grid-column: 2; align-self: start; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); font-size: 18px; line-height: 1 }
.edit:hover { background: var(--line) }
.state { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); pointer-events: none; text-align: center }
.on .state { border-top-color: var(--go-line); color: var(--go) }
.dot { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; flex: none }
.on .dot { background: var(--go); border-color: var(--go) }
.on .dot::after { content: ""; width: 4px; height: 7px; border: solid var(--surface); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg) }
.empty { border: 1.5px dashed var(--line); border-radius: 12px; padding: 32px 20px; text-align: center; color: var(--muted); grid-column: 1 / -1 }
.empty strong { display: block; font-family: var(--f-display); font-size: 22px; color: var(--fg); text-transform: uppercase; margin-bottom: 4px }

/* ---------- Ficha técnica ---------- */
#fichaView { display: grid; gap: 14px; padding-top: 12px }
.ficha-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end }
.print-title { display: none }
.fsec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden }
.fsec h3 { margin: 0; padding: 10px 14px; background: var(--go); color: #fff; font-family: var(--f-display); font-size: 18px; letter-spacing: .04em; text-transform: uppercase }
.frow { display: grid; grid-template-columns: 150px 220px 1fr auto; gap: 8px 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line) }
.frow:first-of-type { border-top: 0 }
.fname { font-weight: 600; text-transform: uppercase; letter-spacing: .02em }
.fval select, .fval input, .fnote input, .fnotas textarea, .otro input { width: 100%; height: 38px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 0 10px; font-size: 15px }
.fval select { font-weight: 600 }
.fval input { text-transform: uppercase; font-weight: 600 }
.fnotas { padding: 12px 14px }
.fnotas textarea { height: auto; padding: 8px 10px; resize: vertical }
.fv { font-weight: 600 } .fv i { color: var(--muted); font-style: normal }
.otro { display: flex; gap: 6px }
.consultas { grid-column: 1 / -1; display: grid; gap: 6px }
.consulta { padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); border: 1px solid var(--warn) }
.consulta.done { background: transparent; border-color: var(--line); opacity: .75 }
.consulta p { margin: 0 } .consulta small { color: var(--muted) }
.consulta .resp { margin-top: 4px; padding-left: 10px } .consulta .pend { color: var(--warn); font-size: 13px }
.answer { display: flex; gap: 6px; margin-top: 6px } .answer input { flex: 1; min-width: 0; height: 32px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; background: var(--surface) }
.consulta .fold { all: unset; cursor: pointer; display: block; width: 100%; font-size: 14px; color: var(--muted) }
.consulta .fold small { color: var(--accent) }
.answer { flex-wrap: wrap }
.archivos { display: grid; gap: 8px; padding: 12px 14px }
.arch { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg) }
.ainfo { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px }
.ainfo b { overflow-wrap: anywhere } .ainfo small { color: var(--muted) }
.print-ficha .archivos { display: none }
.ask textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface) }
.ask .row { margin-top: 6px }
.fsec.tedit { padding: 12px 14px; display: grid; gap: 10px }
.tsec-head { display: flex; gap: 8px } .tsec-head input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-family: var(--f-display); font-size: 18px; font-weight: 700; text-transform: uppercase; background: var(--bg) }
.trow { display: grid; gap: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px }
.trow-main { display: flex; flex-wrap: wrap; gap: 8px } .trow-main input { flex: 1 1 160px; min-width: 0 }
.trow input, .trow select, .trow textarea { height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--bg) }
.trow textarea { height: auto; padding: 6px 10px; resize: vertical }
.trow summary { cursor: pointer; font-weight: 600; font-size: 14px }
.checks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 }

/* ---------- Sheets ---------- */
.sheet, .login { position: fixed; inset: 0; z-index: 20; display: grid; place-items: end center;
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)) }
.sheet { background: color-mix(in srgb, var(--fg) 35%, transparent) }
.login { background: var(--bg); place-items: center }
.panel, .login form { width: min(520px, 100%); max-height: 100%; overflow-y: auto; background: var(--surface); border-radius: 14px; padding: 18px; display: grid; gap: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25) }
.panel.wide { width: min(900px, 100%) }
.login form { box-shadow: none; border: 1px solid var(--line) }
.login p { margin: 0; color: var(--muted) }
.login .error { color: var(--bad); font-weight: 600 }
.panel h2 { margin: 0; font-family: var(--f-display); font-size: 22px; text-transform: uppercase }
.panel h3 { margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted) }
.sheet .show { grid-template-columns: 1fr 1fr }
.sheet #sLugarF { grid-column: 1 / -1; order: -1 }
.copy { display: grid; gap: 6px }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px }
.check input { width: 18px; height: 18px; accent-color: var(--accent); flex: none }
@media (min-width: 700px) { .sheet { place-items: center } }

/* Bulto sheet */
.bhead { display: flex; gap: 8px; align-items: center }
.bhead h2, .bname { flex: 1; min-width: 0 }
.bname { height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--bg); font-family: var(--f-display); font-size: 22px; font-weight: 700; text-transform: uppercase }
.pills { display: flex; flex-wrap: wrap; gap: 6px }
.pill { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted) }
.pill.on { border-color: var(--go-line); background: var(--go-bg); color: var(--go) }
.report textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--bg); margin-bottom: 8px }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line) }
.thumb.big { width: 84px; height: 84px }
.hist { display: grid; gap: 8px }
.prob { display: flex; gap: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--bad); background: var(--bad-bg) }
.prob.done { border-color: var(--line); background: transparent }
.ptext { display: grid; gap: 4px; align-content: start; min-width: 0 } .ptext p { margin: 0; overflow-wrap: anywhere } .ptext small { color: var(--muted) }
.ptext .btn { justify-self: start }

/* Users */
.users { display: grid; gap: 6px }
.user { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px }
.uname { display: grid; gap: 2px; flex: 1 1 200px; min-width: 0 }
.uname input { height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; background: var(--bg); font-weight: 600 }
.uname small { color: var(--muted); overflow-wrap: anywhere }
.nuevo, .credenciales { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg) }
.nuevo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.nuevo-grid .field:last-child { grid-column: 1 / -1 }
.credenciales { border-color: var(--go-line); background: var(--go-bg) }
.credenciales pre { margin: 0; padding: 10px; border-radius: 8px; background: var(--surface); font-family: var(--f-body); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all }
.manual-btn { text-decoration: none; justify-self: start }
.btn.wa { background: #25d366; border-color: #25d366; color: #fff; text-decoration: none }
@media (max-width: 520px) { .nuevo-grid { grid-template-columns: 1fr } }

/* ---------- QR labels: A4, 3 × 8 of 70 × 36 mm ---------- */
.labels-preview { max-height: 55vh; overflow: auto; display: grid; gap: 12px; background: var(--bg); padding: 10px; border-radius: 10px }
.lpage { display: grid; grid-template-columns: repeat(3, 70mm); grid-auto-rows: 36mm; background: #fff; color: #000; width: 210mm; padding-top: 4.5mm }
.labels-preview .lpage { zoom: .6; box-shadow: 0 2px 8px rgba(0,0,0,.15) }
.label { display: flex; align-items: center; gap: 3mm; padding: 3mm 4mm; overflow: hidden }
.label svg { width: 29mm; height: 29mm; flex: none }
.ltext { display: grid; gap: 1mm; min-width: 0 }
.ltext b { font-family: var(--f-display); font-size: 12pt; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere }
.ltext small { font-size: 7pt; color: #555 }
.labels { display: none }

/* ---------- Scanner ---------- */
.scanner { position: fixed; inset: 0; z-index: 40; background: #000; display: grid }
.scanner video { width: 100%; height: 100%; object-fit: cover; grid-area: 1 / 1 }
.scan-frame { grid-area: 1 / 1; place-self: center; width: min(70vw, 300px); aspect-ratio: 1; border: 3px solid rgba(255,255,255,.9); border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35) }
.scan-top { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #fff; font-weight: 600 }
.scan-result { position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); padding: 16px; border-radius: 14px; background: rgba(0,0,0,.75); color: #fff; text-align: center; font-family: var(--f-display); font-size: 24px; font-weight: 700; text-transform: uppercase; white-space: pre-line }
.scan-result.ok { background: #1f9d55 } .scan-result.bad { background: #d63333 } .scan-result.warn { background: #b7791f }

.shutter { position: absolute; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.35) }
.shutter:active { background: #fff }

/* Login extras */
.link { background: none; border: 0; padding: 4px 0; color: var(--accent); font-weight: 600; justify-self: center; text-decoration: underline; text-underline-offset: 3px }
.forgot { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px }
.panel .error { margin: 0; color: var(--bad); font-weight: 600 }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 9px; font-size: 14px; z-index: 50; max-width: calc(100% - 32px) }

/* ---------- Narrow screens ---------- */
@media (max-width: 820px) {
  .show { grid-template-columns: 1fr 1fr } #lugarF { grid-column: 1 / -1; order: -1 }
  .frow { grid-template-columns: 1fr 1fr; }
  .fname { grid-column: 1 / -1 } .fask { grid-column: 1 / -1; justify-self: start }
}
@media (max-width: 640px) {
  header { position: static }
  .grid { grid-template-columns: 1fr 1fr; gap: 8px }
  .name { font-size: 16px } .tap { padding: 11px 10px 9px } .omni kbd { display: none } .omni input { padding-right: 12px }
  .bar .btn { flex: 1 1 auto } .bulk { margin-left: 0 }
  .frow { grid-template-columns: 1fr }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important } .card:active { transform: none } }

/* ---------- Print: ficha as PDF, or the label sheets ---------- */
@media print {
  body { background: #fff; color: #000; padding: 0 }
  body.print-ficha { padding: 12mm }
  body::before, .toast, .sheet, .scanner { display: none !important }
  .print-ficha header, .print-ficha #bultosView, .print-ficha .ficha-tools, .print-ficha .fask, .print-ficha .consultas, .print-ficha .avisos { display: none !important }
  .print-ficha #fichaView { display: grid !important; padding: 0 }
  .print-ficha .print-title { display: block; font-family: var(--f-display); margin: 0 0 4mm }
  .print-ficha .fsec { break-inside: avoid; border-color: #ccc }
  .print-ficha .fsec h3 { background: #1f9d55 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact }
  .print-ficha .frow { grid-template-columns: 40mm 50mm 1fr; padding: 2mm 4mm }
  .print-ficha .fval select, .print-ficha .fval input, .print-ficha .fnote input, .print-ficha textarea { border: 0; appearance: none; -webkit-appearance: none; background: none; padding: 0; height: auto }
  .print-labels #app { display: none !important }
  .print-labels .labels { display: block }
  .print-labels .lpage { break-after: page; zoom: 1 }
}
@page { size: A4; margin: 0 }

/* Demo mode */
.demo-banner { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 8px 16px; background: #7c3aed; color: #fff; font-size: 14px; text-align: center }
.demo-banner .btn { background: #fff; color: #4c1d95; border-color: #fff }
.demo-share { display: grid; gap: 6px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px }
.demo-share p { margin: 0 }
.demo-share .row { display: flex; gap: 8px; flex-wrap: wrap }
.demo-share .btn { text-decoration: none }

/* Version and Novedades */
.version { margin: 0; font-size: 13px; color: var(--muted) }
.version .link { font-size: 13px; padding: 0 }
.nov + .nov { margin-top: 14px }
.nov ul { margin: 0; padding-left: 20px; display: grid; gap: 6px }
