/* 3.9.2: App de trabajadores NEXUZ (diseño aprobado). Solo se activa con body.wa-on en la superficie
   de trabajadores; el resto del sistema no cambia. */
:root {
  --wa-bg: #F4F5F7;
  --wa-card: #FFFFFF;
  --wa-ink: #1B1F23;
  --wa-muted: #5E6872;
  --wa-line: #E3E6EA;
  --wa-red: #CF0912;
  --wa-red-dark: #A3070D;
  --wa-red-soft: #FCEBEC;
  --wa-dark: #1F2428;
  --wa-green: #1E8E5A;
  --wa-green-dark: #11613A;
  --wa-green-soft: #E6F4EC;
  --wa-amber: #7A4B00;
  --wa-amber-soft: #FFF3DC;
  --wa-blue: #1F4E9A;
  --wa-blue-soft: #EAF1FB;
  --wa-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- Marco de la App ---------- */
body.wa-on { background: var(--wa-bg); color: var(--wa-ink); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: transparent; }
body.wa-on .header,
body.wa-on .topnav,
body.wa-on .app-pane > .pane-head,
body.wa-on #appSession > .row.space,
body.wa-on #portalSelector,
body.wa-on .app-shell [data-action="backPortals"],
body.wa-on .app-shell [data-action="backPortals"] ~ b,
body.wa-on .app-nav,
body.wa-on #portalWorker > .row.space,
body.wa-on #portalAttendance > .row.space,
body.wa-on #portalTrucks > .row.space { display: none !important; }
body.wa-on .integrated { max-width: 560px; margin: 0 auto; padding: 0; min-height: 0; }
body.wa-on .pane.app-pane { border: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: visible; }
body.wa-on .app-pane .pane-body { padding: 0 16px calc(96px + var(--wa-safe-bottom)); min-height: 100dvh; background: transparent; }
body.wa-on .app-shell { max-width: none; }
body.wa-on #appSession { display: flex; flex-direction: column; gap: 16px; padding-top: max(14px, env(safe-area-inset-top, 0px)); }
body.wa-on #appSession > * { margin-top: 0; }
body.wa-on .card { border: 0; border-radius: 18px; box-shadow: 0 1px 2px rgba(20, 24, 28, .06); }
body.wa-on .btn { min-height: 46px; border-radius: 14px; font-weight: 700; }
body.wa-on input, body.wa-on select, body.wa-on textarea { min-height: 46px; border-radius: 12px; font-size: 16px; }
body.wa-on .wa-view[hidden] { display: none !important; }
.wa-tabs[hidden] { display: none !important; }

/* Pestañas: qué partes del sistema anterior se ven en cada una. */
body.wa-on[data-wa-view="home"] #portalWorker,
body.wa-on[data-wa-view="home"] #portalAttendance,
body.wa-on[data-wa-view="home"] #portalTrucks { display: none !important; }
body.wa-on[data-wa-view="attendance"] #portalAttendance > .card:nth-child(2) { display: none !important; }
body.wa-on[data-wa-view="trucks"]:not(.wa-classic) #portalTrucks { display: none !important; }
body.wa-on #portalWorker .app-screen { display: none !important; }
/* 4.0.2: una tarea por pantalla. Firmar = pendientes; Mis documentos, Permisos y Mis datos se abren desde Yo. */
body.wa-on[data-wa-view="sign"] #portalWorker [data-appscreen="aSign"],
body.wa-on[data-wa-view="docs"] #portalWorker [data-appscreen="aDocs"],
body.wa-on[data-wa-view="events"] #portalWorker [data-appscreen="aEvents"],
body.wa-on[data-wa-view="profile"] #portalWorker [data-appscreen="aProfile"] { display: flex !important; flex-direction: column; gap: 14px; margin-bottom: 14px; }
body.wa-on[data-wa-view="me"] #portalWorker { display: none !important; }
body.wa-on #portalWorker [data-appscreen="aSign"] .legal-sign-box { order: 9; font-size: 13px; opacity: .85; }
body.wa-on #portalWorker .worker-upload { background: var(--wa-card); border-radius: 18px; padding: 16px; border: 0; }

/* ---------- Encabezado ---------- */
.wa-top { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.wa-logo { width: 96px; height: 34px; object-fit: contain; object-position: left center; mix-blend-mode: multiply; }
.wa-title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.wa-bell { margin-left: auto; position: relative; width: 46px; height: 46px; border: 0; border-radius: 14px; background: var(--wa-card); color: var(--wa-ink); display: flex; align-items: center; justify-content: center; }
.wa-dot { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--wa-red); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-sizing: border-box; }
.wa-avatar { width: 46px; height: 46px; flex: 0 0 46px; border: 0; border-radius: 50%; background: var(--wa-dark); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.wa-avatar.big { width: 56px; height: 56px; flex-basis: 56px; font-size: 18px; }

/* ---------- Inicio ---------- */
.wa-view { display: flex; flex-direction: column; gap: 16px; }
.wa-hello h1 { margin: 2px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.wa-date { font-size: 14px; font-weight: 600; color: var(--wa-muted); }
.wa-day { padding: 18px; border-radius: 20px; background: var(--wa-dark); color: #fff; display: flex; flex-direction: column; gap: 12px; }
.wa-day-status { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: #C9CED3; }
.wa-day-big { font-size: 30px; font-weight: 800; }
.wa-day-big small { font-size: 15px; font-weight: 600; color: #AEB4BA; }
.wa-day-btn { height: 56px; border: 0; border-radius: 14px; background: #fff; color: var(--wa-dark); font: inherit; font-size: 17px; font-weight: 800; }
.wa-day-btn:disabled { opacity: .6; }
.wa-led { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: #8A939B; display: inline-block; }
.wa-led.on { background: #3CCB7F; box-shadow: 0 0 0 4px rgba(60, 203, 127, .2); }
.wa-led.done { background: #3CCB7F; }
.wa-led.red { background: var(--wa-red); }
.wa-section-title { font-size: 15px; font-weight: 800; }
.wa-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wa-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 128px; padding: 16px; border: 0; border-radius: 18px; background: var(--wa-card); color: var(--wa-ink); text-align: left; font: inherit; box-shadow: 0 1px 2px rgba(20, 24, 28, .06); }
.wa-tile:active, .wa-start:active, .wa-day-btn:active { transform: scale(.98); }
.wa-tile b { display: block; font-size: 17px; line-height: 1.2; }
.wa-tile small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--wa-muted); }
.wa-tile.hot { background: var(--wa-red); color: #fff; }
.wa-tile.hot small { color: rgba(255, 255, 255, .85); }
.wa-ico { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .18); }
.wa-ico.red { background: var(--wa-red-soft); color: var(--wa-red); }
.wa-ico.blue { background: var(--wa-blue-soft); color: var(--wa-blue); }
.wa-ico.green { background: var(--wa-green-soft); color: var(--wa-green-dark); }
.wa-ico.dark { background: #E9EBEE; color: var(--wa-dark); }
.wa-card { background: var(--wa-card); border-radius: 18px; box-shadow: 0 1px 2px rgba(20, 24, 28, .06); }
.wa-list { overflow: hidden; }
.wa-card-title { padding: 14px 16px 8px; font-size: 15px; font-weight: 800; }
.wa-notice { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-top: 1px solid #EEF0F2; background: transparent; color: var(--wa-ink); font: inherit; font-size: 14.5px; text-align: left; }
.wa-empty { padding: 6px 16px 16px; color: var(--wa-muted); font-size: 14px; }
.wa-small { font-size: 13px; color: var(--wa-muted); line-height: 1.4; }
.wa-muted-strong { font-size: 14px; font-weight: 700; color: var(--wa-muted); text-align: center; }
.wa-msg { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 14px; font-weight: 700; line-height: 1.35; }
.wa-msg.ok { background: var(--wa-green-soft); color: var(--wa-green-dark); }
.wa-msg.bad { background: var(--wa-red-soft); color: var(--wa-red-dark); }
.wa-msg.info { background: var(--wa-blue-soft); color: var(--wa-blue); }
.wa-msg svg { flex: 0 0 auto; }
.wa-day .wa-msg { font-weight: 600; }
.wa-busy-line { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; font-weight: 700; }
.wa-spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(127, 127, 127, .3); border-top-color: currentColor; animation: wa-spin .8s linear infinite; display: inline-block; }
.wa-spin.big { width: 44px; height: 44px; border-width: 5px; }
@keyframes wa-spin { to { transform: rotate(360deg); } }
.wa-install { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; }
.wa-install img { border-radius: 12px; border: 1px solid var(--wa-line); }
.wa-install > div > b:first-child { display: block; font-size: 16px; margin-bottom: 2px; }
.wa-install .wa-btn { margin-top: 10px; }
.wa-x { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; border: 0; background: transparent; font-size: 24px; color: var(--wa-muted); }
.wa-btn { min-height: 46px; padding: 0 18px; border: 1px solid #D5D9DE; border-radius: 14px; background: #fff; color: var(--wa-ink); font: inherit; font-size: 15.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.wa-btn.primary { border: 0; background: var(--wa-red); color: #fff; font-weight: 800; }
.wa-btn.primary:disabled { background: #E3A3A6; }
.wa-btn.big { min-height: 56px; font-size: 17px; }
.wa-btn.ghost-dark { background: rgba(255, 255, 255, .12); color: #fff; border: 0; }
.wa-me { display: flex; align-items: center; gap: 14px; padding: 16px; }
.wa-me b { font-size: 17px; }
.wa-me .wa-btn { margin-left: auto; }

/* ---------- Asistencia ---------- */
.wa-geo { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 14.5px; font-weight: 700; }
.wa-geo.ok { background: var(--wa-green-soft); color: var(--wa-green-dark); }
.wa-geo.warn { background: var(--wa-amber-soft); color: var(--wa-amber); }
.wa-round-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px 16px; border-radius: 22px; }
.wa-round { width: 210px; height: 210px; border-radius: 50%; border: 10px solid var(--wa-red-soft); background: var(--wa-red); color: #fff; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 10px 30px rgba(207, 9, 18, .28); font-size: 19px; font-weight: 800; }
.wa-round.idle { background: var(--wa-green); border-color: var(--wa-green-soft); box-shadow: none; }
.wa-round:disabled:not(.idle) { opacity: .6; }
.wa-round:active:not(:disabled) { transform: scale(.97); }
.wa-week { display: flex; align-items: flex-end; height: 92px; padding: 0 16px 14px; }
.wa-wday { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--wa-muted); }
.wa-bar { width: 22px; border-radius: 6px; background: var(--wa-dark); }
.wa-wday.today { color: var(--wa-red); }
.wa-wday.today .wa-bar { background: var(--wa-red); }
.wa-ev { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid #EEF0F2; font-size: 15px; }
.wa-ev b { width: 56px; }
.wa-ok { margin-left: auto; color: var(--wa-green-dark); font-size: 13px; font-weight: 800; }

/* ---------- Camiones ---------- */
.wa-start { display: flex; align-items: center; gap: 16px; min-height: 104px; padding: 18px; border: 0; border-radius: 20px; background: var(--wa-red); color: #fff; font: inherit; text-align: left; box-shadow: 0 10px 26px rgba(207, 9, 18, .25); }
.wa-start b { display: block; font-size: 21px; font-weight: 800; }
.wa-start small { display: block; margin-top: 4px; font-size: 14px; color: rgba(255, 255, 255, .88); }
.wa-start-ico { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 18px; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; }
.wa-queue button { margin-left: auto; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--wa-blue); color: #fff; font: inherit; font-weight: 800; font-size: 13px; }
.wa-truck-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid #EEF0F2; }
.wa-truck-row small { display: block; font-size: 12.5px; color: var(--wa-muted); margin-top: 2px; }
.wa-time { width: 44px; font-size: 14px; }
.wa-plate-sm { display: inline-block; padding: 1px 8px; border: 2px solid var(--wa-ink); border-radius: 6px; font-weight: 800; letter-spacing: .04em; font-size: 15px; }
.wa-chip { margin-left: auto; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.wa-chip.ok { background: var(--wa-green-soft); color: var(--wa-green-dark); }
.wa-chip.warn { background: var(--wa-amber-soft); color: var(--wa-amber); }
.wa-chip.bad { background: var(--wa-red-soft); color: var(--wa-red-dark); }
.wa-link { align-self: center; min-height: 44px; border: 0; background: transparent; color: var(--wa-muted); font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; }

/* ---------- Menú inferior ---------- */
.wa-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; justify-content: center; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--wa-line); padding-bottom: var(--wa-safe-bottom); backdrop-filter: blur(8px); }
.wa-tab { flex: 1; max-width: 120px; height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: transparent; color: var(--wa-muted); font: inherit; font-size: 11.5px; font-weight: 700; }
.wa-tab[aria-current="page"] { color: var(--wa-red); }
body.wa-flow-open .wa-tabs { display: none; }
body.wa-flow-open { overflow: hidden; }

/* ---------- Registro guiado ---------- */
.wa-flow { position: fixed; inset: 0; z-index: 1000; background: var(--wa-bg); color: var(--wa-ink); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; overflow: hidden; }
.wa-flow[hidden] { display: none; }
.wf-page { position: relative; height: 100%; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.wf-head { padding: max(14px, env(safe-area-inset-top, 0px)) 16px 14px; background: #fff; border-bottom: 1px solid var(--wa-line); }
.wf-head-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 700; color: var(--wa-muted); }
.wf-headlink { min-height: 40px; padding: 0 4px; border: 0; background: transparent; color: var(--wa-red-dark); font: inherit; font-weight: 800; }
.wf-steps { display: flex; gap: 6px; margin-top: 8px; }
.wf-steps span { flex: 1; height: 6px; border-radius: 3px; background: var(--wa-line); }
.wf-steps span.done { background: var(--wa-green); }
.wf-steps span.now { background: var(--wa-red); }
.wf-head h1 { margin: 12px 0 0; font-size: 23px; font-weight: 800; }
.wf-sub { margin-top: 4px; font-size: 14px; color: var(--wa-muted); }
.wf-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.wf-body.center { align-items: center; padding-top: 40px; }
.wf-foot { padding: 12px 16px calc(16px + var(--wa-safe-bottom)); background: #fff; border-top: 1px solid var(--wa-line); display: flex; flex-direction: column; gap: 10px; }
.wf-foot.row { flex-direction: row; }
.wf-foot.row .wa-btn { flex: 1; font-size: 15px; padding: 0 10px; }
.wf-foot.row .grow { flex: 1.3; font-size: 17px; }
.wf-busy { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(244, 245, 247, .9); color: var(--wa-ink); font-size: 18px; }
.wf-cam .wf-busy { background: rgba(14, 17, 20, .82); color: #fff; }

/* Cámara */
.wf-cam { position: relative; height: 100%; background: #0E1114; color: #fff; overflow: hidden; }
.wf-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wf-cam-head { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: max(16px, env(safe-area-inset-top, 0px)) 16px 16px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.wf-cam-head b { font-size: 17px; }
.wf-cam-head > [data-wf="torch"] { margin-left: auto; }
.wf-dim { font-size: 13px; color: #C9CED3; }
.wf-round { width: 46px; height: 46px; flex: 0 0 46px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; display: flex; align-items: center; justify-content: center; }
.wf-round[hidden] { display: none; }
.wf-frame { position: absolute; left: 50%; top: 40%; width: min(72vw, 330px); aspect-ratio: 2 / 1; transform: translate(-50%, -50%); z-index: 1; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .28); border-radius: 12px; }
.wf-frame span { position: absolute; width: 34px; height: 34px; border: 0 solid #3CCB7F; }
.wf-frame span:nth-child(1) { left: -6px; top: -6px; border-left-width: 4px; border-top-width: 4px; border-top-left-radius: 12px; }
.wf-frame span:nth-child(2) { right: -6px; top: -6px; border-right-width: 4px; border-top-width: 4px; border-top-right-radius: 12px; }
.wf-frame span:nth-child(3) { left: -6px; bottom: -6px; border-left-width: 4px; border-bottom-width: 4px; border-bottom-left-radius: 12px; }
.wf-frame span:nth-child(4) { right: -6px; bottom: -6px; border-right-width: 4px; border-bottom-width: 4px; border-bottom-right-radius: 12px; }
.wf-pill { position: absolute; left: 50%; top: calc(40% + min(18vw, 83px) + 22px); transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--wa-green-dark); font-size: 14px; font-weight: 800; white-space: nowrap; }
.wf-pill[hidden] { display: none; }
.wf-pill span { width: 8px; height: 8px; border-radius: 50%; background: #3CCB7F; }
.wf-cam-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 22px 20px calc(26px + var(--wa-safe-bottom)); background: #0E1114; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.wf-cam-title { font-size: 19px; font-weight: 800; }
.wf-cam-buttons { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 420px; margin-top: 4px; }
.wf-side { width: 104px; height: 50px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: 14.5px; font-weight: 700; }
.wf-shutter { width: 80px; height: 80px; border-radius: 50%; border: 5px solid #fff; background: var(--wa-red); }
.wf-shutter:active { transform: scale(.94); }
.wf-cam-error .wf-cam-msg { position: absolute; left: 24px; right: 24px; top: 30%; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; font-size: 15px; color: #C9CED3; }
.wf-cam-error .wf-cam-msg b { color: #fff; font-size: 19px; }
.wf-cam-error .wf-cam-foot .wa-btn { width: 100%; }

/* Corregir / escribir patente */
.wf-shot { height: 92px; border-radius: 14px; overflow: hidden; background: #4A535B; }
.wf-shot img { width: 100%; height: 100%; object-fit: cover; }
.wf-options { display: flex; gap: 10px; }
.wf-option { flex: 1; height: 60px; border: 2px solid var(--wa-line); border-radius: 14px; background: #fff; font: inherit; font-size: 24px; font-weight: 800; letter-spacing: .03em; color: var(--wa-ink); }
.wf-option:active { border-color: var(--wa-red); }
.wf-label { font-size: 14px; font-weight: 800; color: #39424A; margin-top: 2px; }
.wf-boxes { display: flex; align-items: center; justify-content: center; gap: 6px; }
.wf-box { width: 46px; height: 58px; border: 2px solid #D5D9DE; border-radius: 10px; background: #fff; font: inherit; font-size: 27px; font-weight: 800; color: var(--wa-ink); padding: 0; }
.wf-box.now { border-color: var(--wa-red); box-shadow: 0 0 0 3px rgba(207, 9, 18, .15); }
.wf-sep { width: 10px; text-align: center; font-size: 22px; font-weight: 800; }
.wf-hint { text-align: center; font-size: 13px; color: var(--wa-muted); line-height: 1.4; }
.wf-hint.warn { color: var(--wa-amber); font-weight: 700; text-align: left; }
.wf-keys { margin-top: auto; padding: 10px 8px; border-radius: 14px; background: #D9DDE1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.wf-keys.digits { grid-template-columns: repeat(5, 1fr); }
.wf-key { height: 52px; border: 0; border-radius: 10px; background: #fff; font: inherit; font-size: 21px; font-weight: 800; color: var(--wa-ink); box-shadow: 0 1px 0 #C8CDD2; padding: 0; }
.wf-key:active { background: var(--wa-red-soft); }
.wf-key.erase { grid-column: span 2; display: flex; align-items: center; justify-content: center; background: #EEF0F2; }
.wf-keys.letters .wf-key.erase { grid-column: span 6; }
.wf-keys.digits .wf-key.erase { grid-column: span 5; }

/* Patente leída y datos */
.wf-plate-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 16px; border-radius: 20px; background: #fff; }
.wf-dimdark { font-size: 14px; color: var(--wa-muted); font-weight: 700; }
.wf-plate { padding: 10px 22px; border: 3px solid var(--wa-ink); border-radius: 10px; background: #fff; font-size: clamp(34px, 11vw, 44px); font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.wf-plate.small { font-size: 30px; padding: 6px 16px; border-radius: 8px; }
.wf-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 800; }
.wf-badge.green { background: var(--wa-green-soft); color: var(--wa-green-dark); }
.wf-badge.amber { background: var(--wa-amber-soft); color: var(--wa-amber); }
.wf-badge.gray { background: #EEF0F2; color: #39424A; }
.wf-known { overflow: hidden; }
.wf-known .wa-busy-line { padding: 16px; justify-content: flex-start; }
.wf-known-title { padding: 14px 16px 8px; font-size: 15px; font-weight: 800; }
.wf-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid #EEF0F2; font-size: 15.5px; }
.wf-row small { display: block; font-size: 12.5px; color: var(--wa-muted); font-weight: 600; }
.wf-row.muted { color: var(--wa-muted); font-size: 13px; }
.wf-change { margin-left: auto; min-height: 40px; border: 0; background: transparent; color: var(--wa-red-dark); font: inherit; font-size: 14px; font-weight: 800; }
.wf-field { padding: 12px 16px; border-top: 1px solid #EEF0F2; }
.wf-field label { display: block; font-size: 13px; font-weight: 700; color: var(--wa-muted); margin-bottom: 6px; }
.wf-field input { width: 100%; box-sizing: border-box; height: 52px; padding: 0 14px; border: 2px solid #D5D9DE; border-radius: 12px; font: inherit; font-size: 17px; }
.wf-field input:focus { outline: none; border-color: var(--wa-red); }
.wf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wf-chips:empty { display: none; }
.wf-chip { min-height: 38px; padding: 0 12px; border: 1px solid #D5D9DE; border-radius: 999px; background: #F7F8F9; font: inherit; font-size: 14px; font-weight: 700; color: #39424A; }
.wf-types { display: flex; gap: 8px; }
.wf-type { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border: 2px solid var(--wa-line); border-radius: 14px; background: #fff; font: inherit; font-size: 13.5px; font-weight: 800; color: var(--wa-ink); }
.wf-type[aria-pressed="true"] { border-color: var(--wa-red); background: #FFF8F8; color: var(--wa-red-dark); }

/* Estado de la carpa */
.wf-op { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 0 16px; border: 2px solid var(--wa-line); border-radius: 16px; background: #fff; font: inherit; font-size: 17px; font-weight: 800; color: var(--wa-ink); text-align: left; }
.wf-dot { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.wf-op.ok .wf-dot { background: var(--wa-green-soft); color: var(--wa-green-dark); }
.wf-op.warn .wf-dot { background: var(--wa-amber-soft); color: var(--wa-amber); }
.wf-op.bad .wf-dot { background: var(--wa-red-soft); color: var(--wa-red-dark); }
.wf-op[aria-pressed="true"].ok { border-color: var(--wa-green); background: #F1FAF5; }
.wf-op[aria-pressed="true"].ok .wf-dot { background: var(--wa-green); color: #fff; }
.wf-op[aria-pressed="true"].warn { border-color: #C98A1B; background: #FFFAF0; }
.wf-op[aria-pressed="true"].bad { border-color: var(--wa-red); background: #FFF8F8; }
.wf-photo-row { display: flex; gap: 10px; margin-top: 6px; }
.wf-thumb { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: #fff; font-size: 14px; font-weight: 800; color: var(--wa-green-dark); }
.wf-thumb img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.wf-photo { flex: 1; min-height: 72px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 2px dashed #B8BEC4; border-radius: 14px; background: transparent; font: inherit; font-size: 14.5px; font-weight: 800; color: #39424A; }
.wf-photo.need { border-color: var(--wa-red); color: var(--wa-red-dark); background: #FFF8F8; }

/* Listo */
.wf-page.done h1 { margin: 4px 0 0; font-size: 28px; font-weight: 800; text-align: center; }
.wf-done-ico { width: 96px; height: 96px; border-radius: 50%; background: var(--wa-green); color: #fff; display: flex; align-items: center; justify-content: center; }
.wf-done-ico.queued { background: var(--wa-blue); }
.wf-summary { width: 100%; overflow: hidden; }
.wf-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 13px 16px; border-top: 1px solid #EEF0F2; font-size: 15px; }
.wf-summary div:first-child { border-top: 0; }
.wf-summary span { color: var(--wa-muted); }
.wf-summary b { text-align: right; }
.wf-summary b.ok { color: var(--wa-green-dark); }
.wf-summary b.warn { color: var(--wa-amber); }
.wf-summary b.bad { color: var(--wa-red-dark); }
.wf-page.done .wa-msg { width: 100%; box-sizing: border-box; }

/* ---------- Ingreso ---------- */
body[data-surface="worker"].wa-login .app-pane > .pane-head { display: none; }
body[data-surface="worker"].wa-login .worker-entry-card-nexuz input { min-height: 52px; font-size: 17px; border-radius: 12px; }
body[data-surface="worker"].wa-login .worker-entry-card-nexuz .btn.primary { min-height: 56px; font-size: 17px; border-radius: 14px; }

@media (min-width: 700px) {
  .wa-tiles { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .wa-spin { animation-duration: 2s; }
  .wa-tile:active, .wa-start:active, .wa-round:active, .wf-shutter:active { transform: none; }
}

/* Avisos breves arriba, para no tapar el menú ni los botones grandes. */
body.wa-on .toast { top: max(10px, env(safe-area-inset-top, 0px)); bottom: auto; left: 10px; right: 10px; width: auto; margin: 0 auto; max-width: 540px; }

/* 3.9.3: guía de uso de la App */
.wa-guide { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; }
.wa-guide-ico { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 14px; background: var(--wa-red); color: #fff; display: flex; align-items: center; justify-content: center; }
.wa-guide > div > b { display: block; font-size: 16px; margin-bottom: 2px; padding-right: 30px; }
.wa-guide .wa-btn { margin-top: 10px; text-decoration: none; }
.wa-login-guide { display: flex; align-items: center; gap: 14px; margin: 0 auto 14px; max-width: 520px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid #E3E6EA; color: #1B1F23; text-decoration: none; }
.wa-login-guide svg { flex: 0 0 auto; color: #CF0912; }
.wa-login-guide b { display: block; font-size: 15.5px; }
.wa-login-guide small { display: block; font-size: 13px; color: #5E6872; margin-top: 2px; }

/* ---------- 4.0.2: App fija, simple, como la de garzones ---------- */
html.wa-nozoom, html.wa-nozoom body { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior-y: none; }
html.wa-nozoom button, html.wa-nozoom a, html.wa-nozoom label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.wa-nozoom input, html.wa-nozoom select, html.wa-nozoom textarea { font-size: 16px !important; }
.wa-top { min-height: 52px; }
.wa-back { width: 46px; height: 46px; flex: 0 0 46px; border: 0; border-radius: 14px; background: var(--wa-card); color: var(--wa-ink); display: flex; align-items: center; justify-content: center; }
.wa-state { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; font-size: 16px; }
.wa-state.warn { background: #FFF4DE; color: #7A4B00; }
.wa-state.on, .wa-state.done { background: var(--wa-green-soft); color: var(--wa-green-dark); }
.wa-state.off { background: #EEF0F2; color: var(--wa-muted); }
.wa-state .wa-led.off { background: #E09A00; }
.wa-state.off .wa-led.off { background: #8A939B; }
.wa-bigs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wa-big { position: relative; min-height: 150px; padding: 16px; border: 0; border-radius: 20px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 4px; text-align: left; font: inherit; color: #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .12); }
.wa-big svg { position: absolute; top: 16px; left: 16px; }
.wa-big b { font-size: 19px; line-height: 1.15; font-weight: 850; }
.wa-big small { font-size: 13.5px; opacity: .9; }
.wa-big:active { transform: scale(.97); }
.wa-big.green { background: linear-gradient(135deg, #188A56, #11673F); }
.wa-big.red { background: linear-gradient(135deg, #DD1621, #A90913); }
.wa-big.dark { background: linear-gradient(135deg, #3A4148, #1B1F23); }
.wa-big.light { background: var(--wa-card); color: var(--wa-ink); box-shadow: 0 1px 2px rgba(20, 24, 28, .08); }
.wa-big-badge { position: absolute; top: 12px; right: 12px; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 16px; background: #fff; color: var(--wa-red); display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 900; font-size: 16px; }
.wa-row-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--wa-card); color: var(--wa-ink); font: inherit; font-size: 15.5px; text-align: left; }
.wa-row-link span { flex: 1; }
.wa-tab { position: relative; font-size: 12.5px; height: 72px; }
.wa-tab-badge { position: absolute; top: 7px; left: 50%; margin-left: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; border: 2px solid #fff; background: var(--wa-red); color: #fff; font-style: normal; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
#waMe { display: flex; flex-direction: column; gap: 16px; }
#waMe[hidden] { display: none !important; }
.wa-me-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 4px; text-align: center; }
.wa-me-head .wa-avatar.big { width: 76px; height: 76px; flex-basis: 76px; font-size: 26px; }
.wa-me-head b { font-size: 22px; }
.wa-me-list { overflow: hidden; }
.wa-me-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 0 16px; border: 0; border-top: 1px solid #EEF0F2; background: transparent; color: var(--wa-ink); font: inherit; font-size: 16px; font-weight: 650; text-align: left; }
.wa-me-row:first-child { border-top: 0; }
.wa-me-row span { flex: 1; }
.wa-me-row > svg:last-child, .wa-row-link > svg:last-child { color: #9AA1A8; }
.wa-logout { order: 9; min-height: 54px; border: 2px solid var(--wa-line); background: transparent; color: var(--wa-muted); font-size: 17px; }
/* Ingreso: solo el acceso NEXUZ, sin la pantalla de elegir. */
body.wa-login .worker-entry-heading, body.wa-login .worker-entry-card-external, body.wa-login .worker-entry-description, body.wa-login .worker-entry-card-head { display: none !important; }
body.wa-login .worker-entry-grid { display: block; }
body.wa-login .worker-entry-card-nexuz { border: 0; box-shadow: none; background: transparent; }
body.wa-login #appLogin input { min-height: 56px; font-size: 20px !important; border-radius: 14px; }
body.wa-login #appLogin [data-action="loginWorker"] { min-height: 58px; font-size: 18px; border-radius: 16px; }
.wa-external-link { display: block; margin: 18px auto 0; text-align: center; color: var(--wa-muted); font-size: 14px; }

/* 5.0.3 · lista de avisos (campana) */
.wa-notice.more { justify-content: center; font-weight: 800; color: #cf0912; }
.wa-notes { position: fixed; inset: 0; z-index: 100050; background: rgba(20, 24, 28, .5); display: flex; align-items: flex-end; justify-content: center; }
.wa-notes-sheet { width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column; background: #fff; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.wa-notes-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #eef0f2; }
.wa-notes-head b { font-size: 20px; }
.wa-notes-close { font: inherit; font-size: 16px; font-weight: 800; padding: 10px 14px; border-radius: 12px; border: 0; background: #1b1f23; color: #fff; }
.wa-notes-body { overflow: auto; padding: 6px 0 12px; }
.wa-notes-all { display: block; margin: 8px 18px; font: inherit; font-weight: 800; font-size: 15px; color: #cf0912; background: none; border: 0; padding: 6px 0; }
.wa-note { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #f2f3f5; }
.wa-note p { margin: 0; font-size: 17px; line-height: 1.35; }
.wa-note small { color: #8a939b; font-size: 14px; }
.wa-note.read p { color: #6b747c; }
.wa-note .wa-led { flex: none; margin-top: 7px; }
.wa-note .wa-led.off { background: #d3d7dc; box-shadow: none; }
.wa-note-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wa-note-actions button { font: inherit; font-size: 16px; font-weight: 800; padding: 11px 16px; border-radius: 12px; border: 1px solid #dfe3e6; background: #fff; }
.wa-note-actions .wa-note-go { background: #cf0912; border-color: #cf0912; color: #fff; }
.wa-notes-empty { padding: 30px 18px; text-align: center; color: #6b747c; font-size: 17px; }
