/* Mockups: estilos compartidos por todas las pantallas */
:root {
  --bg: #e9ecef;
  --app-bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1c2330;
  --muted: #5d6675;
  --line: #d9dde3;
  /* Paleta tomada de la identidad de la empresa (GrupoTigre.jpg) */
  --brand-navy: #020d5f;
  --accent: #0c3f92;
  --brand-bright: #4f89d2;
  --brand-light: #a6d3f4;
  --accent-soft: #e6f0fb;
  --accent-text: #ffffff;
  --ok: #1d7a3e;
  --ok-soft: #e4f4e9;
  --warn: #8a5a00;
  --warn-soft: #fdf3dc;
  --err: #b42318;
  --err-soft: #fdebea;
  --occupied: #c9cfd8;
  --radius: 14px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }

/* --- Disposición de revisión: teléfono + panel de notas --- */
.review { display: flex; gap: 32px; padding: 24px; align-items: flex-start; flex-wrap: wrap; }
.notes { max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 14px; line-height: 1.5; }
.notes h1 { font-size: 18px; margin: 0 0 4px; }
.notes .id { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.notes h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 6px; }
.notes ul { margin: 0; padding-left: 18px; }
.notes .nav { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.notes .nav a { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.notes .nav a:hover { border-color: var(--accent); color: var(--accent); }

/* Modo captura PNG: solo el teléfono */
body.png { background: #ffffff; }
body.png .review { padding: 20px; }
body.png .notes { display: none; }

/* --- Marco de teléfono --- */
.phone { width: 390px; height: 844px; border: 10px solid #15181d; border-radius: 46px; background: var(--app-bg); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(0,0,0,.18); flex-shrink: 0; }
.statusbar { height: 40px; display: flex; justify-content: space-between; align-items: center; padding: 0 26px; font-size: 14px; font-weight: 600; background: var(--surface); }
.statusbar .icons { display: flex; gap: 4px; align-items: center; }

/* Íconos SVG (Material Symbols) */
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.appbar .back .icon, .result .chev .icon { display: block; }
.hint-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--accent); font-weight: 600; }
.map a { cursor: pointer; }
.map a:hover rect { filter: brightness(.94); }
.rack.zone { grid-template-columns: repeat(4, 1fr); }
.rack.zone .cell { height: 56px; }

/* --- Encabezado de la app --- */
.appbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 12px; display: flex; align-items: center; gap: 12px; }
.appbar .back { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--app-bg); }
.appbar .titles { flex: 1; min-width: 0; }
.appbar .title { font-size: 18px; font-weight: 700; }
.appbar .subtitle { font-size: 13px; color: var(--muted); }
.plant-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; padding: 6px 10px; border-radius: 999px; }

.steps { display: flex; gap: 6px; margin-top: 8px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.on { background: var(--accent); }

/* --- Contenido --- */
.content { flex: 1; overflow: hidden; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.section-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: -6px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }

.footer { padding: 12px 16px 22px; background: var(--surface); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.btn { display: flex; justify-content: center; align-items: center; height: 54px; border-radius: 12px; font-size: 17px; font-weight: 700; border: 1px solid var(--line); background: var(--surface); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); box-shadow: 0 4px 12px rgba(12,63,146,.25); }
.btn.danger { background: var(--err); color: #fff; border-color: var(--err); }

/* --- Inicio --- */
.greeting { font-size: 22px; font-weight: 700; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; }
.tile .ico { color: var(--accent); line-height: 0; }
.tile.main .ico { color: #fff; }
.tile .name { font-weight: 700; font-size: 15px; }
.tile .cu { font-size: 11px; color: var(--muted); }
.tile.main { grid-column: span 2; background: linear-gradient(120deg, var(--brand-navy) 0%, var(--accent) 55%, var(--brand-bright) 100%); color: #fff; border: 0; min-height: 92px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; }
.tile.main .cu { color: var(--brand-light); }
.badge { background: var(--err); color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-left: 6px; }

/* --- Búsqueda de producto --- */
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 2px solid var(--accent); border-radius: 12px; height: 54px; padding: 0 14px; font-size: 17px; }
.search .ph { color: var(--muted); }
.search .caret { width: 2px; height: 22px; background: var(--accent); margin-left: -6px; }
.results { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.result { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.result:last-child { border-bottom: 0; }
.result .thumb { width: 42px; height: 42px; border-radius: 10px; background: var(--app-bg); display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.result .info { flex: 1; min-width: 0; }
.result .pname { font-weight: 700; font-size: 15px; }
.result .meta { font-size: 13px; color: var(--muted); }
.result .chev { color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); }

.empty { text-align: center; padding: 26px 16px; }
.empty .ico { color: var(--muted); }
.empty .t { font-weight: 700; font-size: 17px; margin: 8px 0 6px; }

/* --- Producto seleccionado y cantidad --- */
.product-head { display: flex; gap: 12px; align-items: center; }
.product-head .thumb { width: 52px; height: 52px; border-radius: 12px; background: var(--app-bg); display: grid; place-items: center; color: var(--muted); }
.product-head .pname { font-weight: 700; font-size: 17px; }
.product-head .meta { font-size: 13px; color: var(--muted); }
.qty { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qty .step { width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--line); background: var(--app-bg); display: grid; place-items: center; }
.qty .value { flex: 1; text-align: center; }
.qty .value .n { font-size: 46px; font-weight: 800; line-height: 1; }
.qty .value .u { font-size: 13px; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow: hidden; margin-right: -16px; }
.chips.scroll .chip { flex-shrink: 0; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.small { padding: 6px 11px; font-size: 13px; }

/* --- Selección de ubicación --- */
.mini { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.mini b { font-size: 15px; }
.rack { display: grid; grid-template-columns: 34px repeat(4, 1fr); gap: 5px; }
.rack .lvl { font-size: 11px; color: var(--muted); display: grid; place-items: center; font-weight: 700; }
.cell { height: 36px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); font-size: 11px; display: grid; place-items: center; color: var(--muted); }
.cell.occ { background: var(--occupied); border-color: var(--occupied); color: #39404b; }
.cell.sel { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 0 0 3px var(--accent-soft); }
.rack .floor { grid-column: 2 / span 4; height: 4px; background: #9aa3af; border-radius: 2px; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; border: 1px solid var(--line); }
.selected-pos { font-size: 14px; }
.selected-pos b { color: var(--accent); }

/* --- Avisos --- */
.alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.4; display: flex; gap: 10px; }
.alert .ico { line-height: 0; padding-top: 1px; }
.alert b { display: block; margin-bottom: 2px; }
.alert.info { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--brand-light); }
.alert.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #b9e2c6; }
.alert.err { background: var(--err-soft); color: var(--err); border: 1px solid #f5c2be; }

/* --- Resumen --- */
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.summary .row:last-child { border-bottom: 0; }
.summary .k { color: var(--muted); }
.summary .v { font-weight: 700; text-align: right; }
.summary .v small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.stockchange { color: var(--ok); }
.audit { font-size: 12px; color: var(--muted); text-align: center; }

/* --- Mapa --- */
.map { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.map svg { width: 100%; height: auto; display: block; }
.locs { display: flex; flex-direction: column; gap: 8px; }
.loc { display: flex; justify-content: space-between; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.loc .new { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; margin-left: 6px; }

/* --- Índice --- */
.index { max-width: 1200px; margin: 0 auto; padding: 28px; }
.index h1 { margin: 0 0 4px; }
.index .lead { color: var(--muted); margin: 0 0 24px; }
.flow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.flow h2 { font-size: 17px; margin: 0 0 4px; }
.flow p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.strip { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; align-items: flex-start; }
.thumbcard { flex-shrink: 0; width: 150px; font-size: 12px; }
.thumbcard img { width: 150px; border: 1px solid var(--line); border-radius: 12px; background: var(--app-bg); display: block; }
.thumbcard .cap { margin-top: 6px; }
.thumbcard .cap b { color: var(--accent); }
.arrow { align-self: center; color: var(--muted); font-size: 20px; }

/* --- Acceso (CU18, CU20, CU23, CU17) --- */
.content.center { justify-content: flex-start; }
.hero { background: linear-gradient(120deg, var(--brand-navy) 0%, var(--accent) 55%, var(--brand-bright) 100%); color: #fff; border-radius: var(--radius); padding: 26px 18px; text-align: center; margin-bottom: 4px; }
.hero-ico { width: 64px; height: 64px; border-radius: 18px; background: rgba(255,255,255,.16); display: grid; place-items: center; margin: 0 auto 10px; }
.hero-title { font-size: 21px; font-weight: 800; }
.hero-text { font-size: 14px; color: var(--brand-light); margin-top: 4px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.input { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; height: 52px; padding: 0 14px; font-size: 16px; color: var(--muted); }
.input span { color: var(--text); flex: 1; }
.input .trail { flex: 0; color: var(--muted); }
.field.error .input { border: 2px solid var(--err); }
.link { color: var(--accent); font-weight: 700; font-size: 14px; }
.center-ico { color: var(--accent); text-align: center; margin-top: 8px; }
.lead-text { font-size: 15px; line-height: 1.45; text-align: center; color: var(--text); }
.center-text { text-align: center; display: flex; justify-content: center; align-items: center; gap: 6px; }
.otp { display: flex; gap: 8px; justify-content: center; }
.otp span { width: 46px; height: 58px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; font-size: 26px; font-weight: 800; }
.otp span:empty { border-color: var(--accent); }
.otp.error span { border-color: var(--err); color: var(--err); }
.policy { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.policy div { display: flex; align-items: center; gap: 8px; }
.policy .ok { color: var(--ok); }
.policy .bad { color: var(--err); font-weight: 700; }
.radios { display: flex; flex-direction: column; gap: 10px; }
.radio-item { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--muted); }
.radio-item.on { border: 2px solid var(--accent); color: var(--accent); }
.radio-item .info { flex: 1; color: var(--text); }
.pname { font-weight: 700; font-size: 15px; }
.meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.account { display: flex; align-items: center; gap: 14px; }
.avatar { width: 58px; height: 58px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.ok-text { color: var(--ok); }
.btn .icon { margin-right: 2px; }

/* --- Mapa y búsqueda (CU02, CU03, CU04, CU12) --- */
.searchrow { display: flex; gap: 8px; }
.searchrow .search { flex: 1; }
.btn.small { height: 54px; padding: 0 16px; font-size: 15px; }
.mapwrap { position: relative; }
.zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--text); }
.zoom .icon { padding: 6px; width: 34px; height: 34px; }
.zoom .icon + .icon { border-top: 1px solid var(--line); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--brand-navy); color: #fff; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.4; }
.toast b { display: block; }
.banner.offline { display: flex; gap: 8px; align-items: center; background: #3b4250; color: #fff; border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 600; }
.legend.col { flex-direction: column; gap: 6px; }
.age { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 4px; margin-top: 2px; }

/* --- Detalle, ajustes y traslado (CU08, CU21, CU22, CU05) --- */
.qtytag { font-weight: 800; font-size: 16px; white-space: nowrap; }
.result .meta .icon { color: var(--muted); }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.actions .btn { font-size: 14px; height: 50px; gap: 4px; }
.result.off { opacity: .55; }
.r { color: var(--accent); line-height: 0; }
.qtybox { min-width: 68px; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font-size: 20px; font-weight: 800; line-height: 1.1; background: var(--surface); }
.qtybox small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.qtybox.error { border: 2px solid var(--err); color: var(--err); }
.card.route { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card.route .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.card.route .v { font-weight: 800; font-size: 15px; }
.arrowico { color: var(--accent); }

/* --- Tareas (CU16, CU26) --- */
.task { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.task .ti { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.task .info { flex: 1; }
.pill { background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; }
.card.count { display: flex; flex-direction: column; gap: 10px; }
.card.count.error { border: 2px solid var(--err); }
.card.count .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stops { display: flex; flex-direction: column; gap: 8px; }
.stop { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stop .num { width: 30px; height: 30px; border-radius: 50%; background: var(--app-bg); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.stop .info { flex: 1; }
.stop.actual { border: 2px solid var(--accent); }
.stop.actual .num { background: var(--accent); color: #fff; border-color: var(--accent); }
.stop.hecha { opacity: .7; }
.stop.hecha .num { background: var(--ok); color: #fff; border-color: var(--ok); }
.card.where .k { font-size: 13px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.card.where .big { font-size: 24px; font-weight: 800; color: var(--accent); margin-top: 4px; }
.mapsmall .map svg { max-height: 196px; }
.agebadge { background: #c0392b; color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.loc .meta { display: inline; }
