/* Inventario de complementos · Volcanarias. Marca: azul Volvo + naranja. Claro por defecto; oscuro automático.
   Pantalla completa en ordenador (menú lateral + contenido que ocupa todo el ancho) y formato móvil con barra inferior. */
:root {
  --navy: #1f2f63; --navy-2: #2a3f86; --orange: #e8541c; --orange-2: #ff7a3d;
  --bg: #f2f4f9; --surface: #fff; --surface-2: #f7f8fc; --border: #e3e7f1; --border-2: #d3d9e8;
  --text: #151c33; --muted: #647091; --faint: #94a0bd;
  --accent: var(--navy); --accent-ink: #fff; --accent-soft: #e8edfb;
  --ok: #178a4a; --ok-soft: #e4f7ec; --warn: #b45309; --warn-soft: #fff1de; --info: #1d4ed8; --info-soft: #e6eefe; --danger: #d12b2b; --danger-soft: #fdeaea;
  --alq: #c2410c; --alq-soft: #ffe9dc;
  --shadow-s: 0 1px 2px rgba(21, 28, 51, .06), 0 1px 1px rgba(21, 28, 51, .04);
  --shadow-m: 0 8px 24px -10px rgba(21, 28, 51, .22), 0 2px 6px rgba(21, 28, 51, .06);
  --shadow-l: 0 28px 70px -24px rgba(21, 28, 51, .45);
  --radius: 16px; --radius-s: 11px; --side: 252px; --top: 68px; --tabbar: 64px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --bg: #0d1222; --surface: #151c34; --surface-2: #1a2240; --border: #252f52; --border-2: #33406a;
    --text: #e8ecf8; --muted: #9aa5c6; --faint: #6e7aa0; --accent: #8fa6f5; --accent-ink: #0d1222; --accent-soft: #232f5e;
    --ok: #52d08a; --ok-soft: #123524; --warn: #f4a64e; --warn-soft: #3a2a12; --info: #8fb0ff; --info-soft: #1a2750; --danger: #ff7b7b; --danger-soft: #3d1b1f; --alq: #ff9d6e; --alq-soft: #3b2216;
    --shadow-s: 0 1px 2px rgba(0, 0, 0, .35); --shadow-m: 0 8px 24px -10px rgba(0, 0, 0, .6); --shadow-l: 0 28px 70px -24px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 15px/1.5 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
svg.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.ic.sm { width: 16px; height: 16px; }
.hide { display: none !important; }

/* ---------- estructura ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--navy); color: #dfe6ff; display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; }
.side .logo { background: #fff; border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; display: grid; place-items: center; }
.side .logo img { height: 40px; max-width: 100%; display: block; }
.side nav { display: grid; gap: 4px; }
.side a.nav { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: #c4cdf0; text-decoration: none; font-weight: 600; font-size: 14.5px; transition: background .15s, color .15s; }
.side a.nav:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side a.nav.on { background: #fff; color: var(--navy); box-shadow: var(--shadow-m); }
.side a.nav .cnt { margin-left: auto; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .14); border-radius: 99px; padding: 1px 8px; }
.side a.nav.on .cnt { background: var(--accent-soft); color: var(--navy); }
.side .sp { flex: 1; }
.side .volvo { background: #fff; border-radius: 12px; padding: 8px 14px; display: grid; place-items: center; margin-bottom: 8px; }
.side .volvo img { height: 20px; display: block; }
.side .yo { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .07); }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--orange), var(--orange-2)); flex: none; }
.side .yo .who { min-width: 0; flex: 1; line-height: 1.25; }
.side .yo b { display: block; font-size: 13.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .yo span { font-size: 12px; color: #a9b4e6; }
.side .yo button { background: none; border: 0; color: #c4cdf0; padding: 8px; border-radius: 10px; }
.side .yo button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 32px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.top h1 { font-size: 21px; line-height: 1.2; }
.top .sub { color: var(--muted); font-size: 13px; }
.top .titulo { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.top .back { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow-s); }
.top .grow { flex: 1; }
.page { padding: 26px 32px 48px; width: 100%; }
.tabbar, .mtop { display: none; }

/* ---------- componentes ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: 12px; font-weight: 650; font-size: 14.5px; box-shadow: var(--shadow-s); transition: transform .1s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.pri:hover { filter: brightness(1.1); background: var(--accent); }
.btn.nar { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.nar:hover { background: var(--orange-2); }
.btn.dan { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: var(--surface); }
.btn.dan:hover { background: var(--danger-soft); }
.btn.sm { padding: 7px 12px; font-size: 13.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.iconbtn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); }
.iconbtn:hover { background: var(--surface-2); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-s); padding: 18px; }
.card.click { cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card.click:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); border-color: var(--border-2); }
.card h3 { font-size: 16px; margin-bottom: 4px; }
.sec { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 28px 0 12px; }
.sec h2 { font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 750; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.alq { background: var(--alq-soft); color: var(--alq); border-color: transparent; }
.badge.dan { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.field .req { color: var(--orange); }
input[type=text], input[type=search], input[type=date], input[type=number], textarea, select { width: 100%; padding: 11px 13px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface); color: var(--text); min-width: 0; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent); border-color: var(--accent); }
.err { color: var(--danger); font-size: 13.5px; margin: 0 0 12px; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 44px 18px; border: 1.5px dashed var(--border-2); border-radius: var(--radius); background: var(--surface); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* barra de herramientas y filtros */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.search { position: relative; flex: 1 1 280px; max-width: 460px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { padding-left: 40px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { border: 1px solid var(--border-2); background: var(--surface); color: var(--muted); padding: 7px 14px; border-radius: 99px; font-weight: 650; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.pill:hover { color: var(--text); border-color: var(--faint); }
.pill.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill .n { font-size: 12px; opacity: .75; }
.toolbar select { width: auto; min-width: 180px; }
.count { color: var(--muted); font-size: 13.5px; margin-left: auto; }

/* rejillas */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-s); display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }
.kpi .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.kpi.ok .ico { background: var(--ok-soft); color: var(--ok); } .kpi.alq .ico { background: var(--alq-soft); color: var(--alq); } .kpi.warn .ico { background: var(--warn-soft); color: var(--warn); }
.kpi b { display: block; font-size: 28px; line-height: 1.1; letter-spacing: -.02em; }
.kpi span { color: var(--muted); font-size: 13.5px; }
.cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.cols.eq { grid-template-columns: 1fr 1fr; }
.cols > * { min-width: 0; }
input[type=date] { min-width: 0; }

/* tarjeta de máquina / tipo */
.mcard { display: flex; flex-direction: column; gap: 12px; padding: 0; overflow: hidden; }
.mcard .foto { height: 148px; background: var(--surface-2); display: grid; place-items: center; color: var(--faint); border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.mcard .foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mcard .foto .tag { position: absolute; top: 10px; right: 10px; }
.mcard .cuerpo { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.mcard h3 { font-size: 17px; }
.mcard .modelo { color: var(--muted); font-size: 14px; margin-top: -4px; }
.mcard .nota { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-2), var(--accent)); border-radius: 99px; }
.stock { display: grid; grid-template-columns: minmax(110px, 1.3fr) 3fr 40px; gap: 12px; align-items: center; padding: 8px 0; font-size: 14px; }
.stock b { text-align: right; }

/* tabla */
.tablewrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-s); overflow: hidden; }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th { text-align: left; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 13px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-weight: 750; white-space: nowrap; }
table.t td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { cursor: pointer; transition: background .12s; }
table.t tbody tr:hover { background: var(--surface-2); }
table.t td.num { font-weight: 750; font-variant-numeric: tabular-nums; }
.thumb { width: 44px; height: 44px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); object-fit: cover; display: grid; place-items: center; color: var(--faint); overflow: hidden; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.uso { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.uso.nuevo { color: var(--ok); font-weight: 650; }
.mas { display: block; margin: 18px auto 0; }

/* lista de elementos (complementos de una máquina, unidades de un tipo...) */
.lista { display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 14px; padding: 13px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-s); }
.item.click { cursor: pointer; } .item.click:hover { border-color: var(--border-2); background: var(--surface-2); }
.item .tx { flex: 1; min-width: 0; }
.item .tx b { display: block; overflow: hidden; text-overflow: ellipsis; }
.item .tx span { color: var(--muted); font-size: 13.5px; }

/* línea de tiempo (historial) */
.tl { position: relative; padding-left: 26px; display: grid; gap: 14px; }
.tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl .ev { position: relative; }
.tl .ev::before { content: ""; position: absolute; left: -24px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--faint); }
.tl .ev.abierto::before { border-color: var(--ok); background: var(--ok-soft); }
.tl .ev b { display: block; } .tl .ev span { color: var(--muted); font-size: 13.5px; }

/* fotos */
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.fotos .f { aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); cursor: zoom-in; }
.fotos .f img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.fotos .f:hover img { transform: scale(1.05); }
.fotos label.add { aspect-ratio: 1; border-radius: 14px; border: 2px dashed var(--border-2); display: grid; place-items: center; color: var(--muted); cursor: pointer; background: var(--surface); text-align: center; font-size: 12.5px; font-weight: 650; padding: 6px; }
.fotos label.add:hover { border-color: var(--accent); color: var(--accent); }
.fotos input { display: none; }
#lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(5, 8, 18, .88); display: none; align-items: center; justify-content: center; padding: 24px; }
#lightbox.open { display: flex; }
#lightbox img { max-width: 100%; max-height: 82vh; border-radius: 14px; box-shadow: var(--shadow-l); }
#lightbox .bar2 { position: absolute; top: 16px; right: 16px; display: flex; gap: 10px; }

/* capas: panel lateral y ventana */
#capa { position: fixed; inset: 0; z-index: 60; background: rgba(8, 12, 28, .55); display: none; backdrop-filter: blur(2px); }
#capa.open { display: block; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg); box-shadow: var(--shadow-l); display: flex; flex-direction: column; animation: entra .22s ease both; }
.modal { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 48px); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-l); display: flex; flex-direction: column; animation: sube .2s ease both; }
.cab { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--border); }
.cab h3 { font-size: 19px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cuerpo-capa { padding: 20px 22px; overflow: auto; flex: 1; }
.pie { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface); }
.drawer .pie { background: var(--bg); }
@keyframes entra { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sube { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.pick { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--border); cursor: pointer; }
.pick input { width: 19px; height: 19px; accent-color: var(--accent); flex: none; }
.pick .tx { flex: 1; min-width: 0; } .pick .tx b { display: block; } .pick .tx span { color: var(--muted); font-size: 13.5px; }
.lista-scroll { max-height: 42vh; overflow: auto; border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; margin-bottom: 8px; }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 13px; box-shadow: var(--shadow-l); opacity: 0; pointer-events: none; transition: .22s; z-index: 100; max-width: 92vw; font-weight: 600; font-size: 14.5px; }
#toast.on { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--danger); color: #fff; }

/* cargando y espera */
.skel { background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: brillo 1.2s linear infinite; border-radius: 14px; }
@keyframes brillo { to { background-position: -200% 0; } }
#espera { position: fixed; inset: 0; z-index: 120; background: var(--bg); display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
#espera .box { max-width: 400px; } #espera img { height: 56px; margin-bottom: 14px; }

/* movimientos */
.mov-grid { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.mov-grid aside { position: sticky; top: calc(var(--top) + 18px); }
.mov { display: flex; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--border); align-items: flex-start; cursor: pointer; }
.mov input { width: 19px; height: 19px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.mov .accion { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.mov .accion.crear { background: var(--ok-soft); color: var(--ok); } .mov .accion.editar { background: var(--info-soft); color: var(--info); } .mov .accion.borrar { background: var(--danger-soft); color: var(--danger); }
.mov .tx { flex: 1; min-width: 0; } .mov .tx b { display: block; overflow-wrap: anywhere; } .mov .tx span { color: var(--muted); font-size: 13px; }
.sombra-lista { max-height: calc(100vh - var(--top) - 190px); overflow: auto; }

/* zona de importar */
.drop { border: 2px dashed var(--border-2); border-radius: 16px; padding: 26px; text-align: center; background: var(--surface-2); transition: .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop p { margin: 6px 0 14px; color: var(--muted); }

/* ---------- móvil y tableta ---------- */
@media (max-width: 1100px) { .cols, .cols.eq, .mov-grid { grid-template-columns: 1fr; } .mov-grid aside { position: static; } .sombra-lista { max-height: none; } }
@media (max-width: 899px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mtop { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; gap: 10px; height: 58px; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-s); }
  .mtop .logo { height: 34px; display: block; }
  .mtop .sp { flex: 1; }
  .mtop .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; border: 0; cursor: pointer; }
  .top { top: 58px; height: auto; min-height: 56px; padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .top h1 { font-size: 18px; } .top .grow { display: none; }
  .page { padding: 16px 14px calc(var(--tabbar) + 28px); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: var(--tabbar); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(21, 28, 51, .1); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 700; position: relative; }
  .tabbar a.on { color: var(--accent); }
  .tabbar a.on::before { content: ""; position: absolute; top: 0; left: 26%; right: 26%; height: 3px; border-radius: 0 0 4px 4px; background: var(--orange); }
  .grid { grid-template-columns: 1fr; }
  .toolbar { gap: 10px; } .search { flex-basis: 100%; max-width: none; } .toolbar select { flex: 1; min-width: 0; }
  .kpis { grid-template-columns: 1fr 1fr; } .kpi { padding: 12px; gap: 10px; } .kpi .ico { width: 38px; height: 38px; } .kpi b { font-size: 23px; }
  .drawer { width: 100%; animation: sube2 .22s ease both; } @keyframes sube2 { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
  .modal { width: 100%; max-height: 92vh; left: 0; top: auto; bottom: 0; transform: none; border-radius: 22px 22px 0 0; animation: sube2 .2s ease both; }
  .cab { padding: 16px 16px 12px; } .cuerpo-capa { padding: 16px; } .pie { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .pie .btn { flex: 1; }
  #toast { bottom: calc(var(--tabbar) + 16px); }
  .kv { grid-template-columns: 110px 1fr; }
  .stock { grid-template-columns: 1fr 1fr 34px; }
}

/* ---------- impresión (parte de movimientos para firmar) ---------- */
#print-area { display: none; }
@media print {
  body { background: #fff; color: #000; }
  .shell, .tabbar, .mtop, #capa, #toast, #lightbox, #espera { display: none !important; }
  #print-area { display: block; font: 12px/1.35 Arial, sans-serif; }
  #print-area .print-brand { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid #1f2f63; padding-bottom: 8px; }
  #print-area .print-logo { height: 46px; } #print-area .print-volvo { height: 20px; margin-left: auto; }
  #print-area .print-title { font-size: 19px; font-weight: 800; color: #1f2f63; } #print-area .print-sub { font-size: 11px; color: #444; }
  #print-area .print-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 24px; font-size: 12.5px; margin-top: 10px; }
  #print-area table { width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 10px; }
  #print-area th, #print-area td { border: 1px solid #999; padding: 4px 6px; text-align: left; vertical-align: top; }
  #print-area th { background: #e9edf3; } #print-area tbody tr:nth-child(even) { background: #f5f6f8; }
  #print-area .c-mov { width: 62px; white-space: nowrap; font-weight: 700; } #print-area .c-cod { width: 60px; white-space: nowrap; }
  #print-area .print-firma { margin-top: 46px; display: flex; gap: 34px; flex-wrap: wrap; font-size: 12.5px; }
  @page { margin: 14mm; }
}
