:root {
  --pizarra: #2b3440;
  --pizarra2: #3a4553;
  --naranja: #d4691a;
  --naranja2: #b85a14;
  --fondo: #f1f3f5;
  --papel: #ffffff;
  --texto: #1f2933;
  --suave: #62707e;
  --borde: #d5dbe1;
  --ok: #15803d;
  --error: #b91c1c;
}
* { box-sizing: border-box; }
html { font-size: 18px; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--fondo); color: var(--texto); line-height: 1.4; }
a { color: var(--naranja2); }
h1 { font-size: 1.5rem; margin: 0 0 .8rem; display: flex; align-items: center; gap: .5rem; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 .6rem; }
.ico { width: 1.2em; height: 1.2em; vertical-align: -0.2em; flex: none; }

.cab { background: var(--pizarra); color: #fff; border-bottom: 4px solid var(--naranja); }
.cab-in { max-width: 980px; margin: 0 auto; padding: .7rem 1rem; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.cab small { display: block; color: #cbd2d9; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.cab .nombre { font-size: 1.25rem; font-weight: 700; }
.logo { width: 2.6rem; height: 2.6rem; background: #fff; color: var(--pizarra); border-radius: 8px; display: grid;
  place-items: center; font-weight: 800; font-size: 1.1rem; }
.cab form { margin-left: auto; }
.nav { background: var(--pizarra2); }
.nav-in { max-width: 980px; margin: 0 auto; display: flex; flex-wrap: wrap; }
.nav a { color: #fff; text-decoration: none; padding: .8rem 1rem; display: flex; align-items: center; gap: .4rem; font-weight: 600; }
.nav a:hover, .nav a.activo { background: var(--naranja); }

main { max-width: 980px; margin: 0 auto; padding: 1rem; }
.tarjeta { background: var(--papel); border: 1px solid var(--borde); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.cifra { background: var(--papel); border: 1px solid var(--borde); border-radius: 12px; padding: .8rem; text-decoration: none; color: var(--texto); display: block; }
.cifra b { display: block; font-size: 1.8rem; }
.cifra span { color: var(--suave); font-size: .85rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--naranja); color: #fff; border: 0;
  border-radius: 10px; padding: .85rem 1.2rem; font-size: 1rem; font-weight: 700; cursor: pointer; text-decoration: none; min-height: 3rem; }
.btn:hover { background: var(--naranja2); }
.btn-sec { background: var(--pizarra); }
.btn-sec:hover { background: var(--pizarra2); }
.btn-claro { background: #fff; color: var(--pizarra); border: 2px solid var(--pizarra); }
.btn-claro:hover { background: #e9edf1; }
.btn-verde { background: var(--ok); }
.btn-verde:hover { background: #116b33; }
.btn-peq { min-height: 2.4rem; padding: .4rem .8rem; font-size: .9rem; }
.btn-ancho { width: 100%; }

label { display: block; font-weight: 600; margin: .9rem 0 .3rem; }
input, select, textarea { width: 100%; font: inherit; padding: .75rem; border: 2px solid var(--borde); border-radius: 10px; background: #fff; color: var(--texto); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--naranja); }
textarea { min-height: 6rem; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 560px) { .dos { grid-template-columns: 1fr; } }
.ayuda { color: var(--suave); font-size: .85rem; margin-top: .25rem; }

.avisos { margin-bottom: 1rem; }
.aviso { padding: .8rem 1rem; border-radius: 10px; margin-bottom: .5rem; font-weight: 600; }
.aviso.ok { background: #dcfce7; color: #14532d; }
.aviso.error { background: #fee2e2; color: #7f1d1d; }

.badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; color: #fff; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.e-recibido { background: #64748b; }
.e-diagnostico { background: #2563eb; }
.e-esperando_recambio { background: #b45309; }
.e-en_reparacion { background: var(--naranja); }
.e-listo { background: var(--ok); }
.e-entregado { background: #475569; }

.fila { display: flex; align-items: center; gap: .8rem; padding: .8rem; border: 1px solid var(--borde); border-radius: 12px;
  background: var(--papel); margin-bottom: .6rem; text-decoration: none; color: var(--texto); flex-wrap: wrap; }
.fila:hover { border-color: var(--naranja); }
.fila .mat { font-weight: 800; font-size: 1.15rem; letter-spacing: .05em; background: #fff; border: 2px solid var(--pizarra);
  border-radius: 6px; padding: .1rem .5rem; }
.fila .resto { flex: 1; min-width: 150px; }
.fila .resto small { display: block; color: var(--suave); }

.estados { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .6rem; }
.estados form { margin: 0; }
.estados button { width: 100%; text-align: left; }
.estados .actual { background: var(--pizarra); cursor: default; }

.mat-grande { display: inline-block; font-size: 2rem; font-weight: 800; letter-spacing: .08em; border: 3px solid var(--pizarra);
  border-radius: 8px; padding: .1rem .7rem; background: #fff; }
.datos { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
.datos dt { color: var(--suave); }
.datos dd { margin: 0; font-weight: 600; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--borde); vertical-align: top; }
.historial { list-style: none; padding: 0; margin: 0; }
.historial li { padding: .4rem 0; border-bottom: 1px solid var(--borde); display: flex; gap: .6rem; flex-wrap: wrap; }
.vacio { color: var(--suave); padding: 1rem; text-align: center; }
.buscar { display: flex; gap: .6rem; margin-bottom: 1rem; }
.filtros { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.filtros a { padding: .4rem .8rem; border-radius: 999px; border: 2px solid var(--pizarra); text-decoration: none; color: var(--pizarra); font-weight: 600; font-size: .9rem; }
.filtros a.activo { background: var(--pizarra); color: #fff; }

/* cliente final */
.publico { max-width: 560px; margin: 0 auto; padding: 1rem; }
.pasos { list-style: none; padding: 0; margin: 1.2rem 0; }
.pasos li { display: flex; align-items: center; gap: .8rem; padding: .55rem 0; color: #8a96a3; font-weight: 600; }
.pasos .punto { width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 3px solid #c5ccd3; display: grid; place-items: center; background: #fff; }
.pasos li.hecho { color: var(--pizarra); }
.pasos li.hecho .punto { background: var(--ok); border-color: var(--ok); color: #fff; }
.pasos li.ahora { color: var(--naranja2); font-size: 1.15rem; }
.pasos li.ahora .punto { border-color: var(--naranja); background: var(--naranja); color: #fff; }
.mensaje-estado { background: #fff7ed; border: 2px solid var(--naranja); border-radius: 12px; padding: 1rem; font-size: 1.1rem; font-weight: 600; }
.mensaje-estado.listo { background: #f0fdf4; border-color: var(--ok); }

/* hoja de entrada e impresión */
.hoja { background: #fff; max-width: 760px; margin: 0 auto; padding: 1.5rem; border: 1px solid var(--borde); }
.hoja-cab { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 3px solid var(--pizarra); padding-bottom: .6rem; margin-bottom: 1rem; }
.hoja-cab h2 { margin: 0; font-size: 1.4rem; }
.qr-caja { text-align: center; border: 2px dashed var(--pizarra); border-radius: 12px; padding: 1rem; margin-top: 1rem; }
.qr-caja svg { width: 200px; height: 200px; }
.firma { height: 4rem; border-bottom: 1px solid #000; margin-top: 2rem; }
@media print {
  .cab, .nav, .no-imprimir, .avisos { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .hoja { border: 0; padding: 0; }
  html { font-size: 16px; }
}

/* ---------- versión 0.2: cartel, escena de elevadores, trabajos ---------- */
:root { --suelo: #3a4553; --atencion: #fff4d6; }
.logo-img { height: 2.8rem; max-width: 9rem; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
h2 .cuenta, h1 .cuenta { display: inline-block; background: var(--pizarra); color: #fff; border-radius: 999px; padding: 0 .55rem; font-size: .8rem; vertical-align: .1rem; }
.columnas { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 1.2rem; }
.aviso.atencion { background: var(--atencion); color: #7a4b00; border: 2px solid #f0b429; }
.botones { display: flex; flex-wrap: wrap; gap: .6rem; }
.botones form { margin: 0; }

/* cartel colgado */
.cartel { position: relative; display: flex; align-items: center; justify-content: center; gap: 1rem; max-width: 640px; margin: 28px auto 1.2rem;
  background: var(--pizarra); color: #fff; border: 4px solid var(--naranja); border-radius: 14px; padding: .8rem 1.4rem;
  box-shadow: 0 6px 0 -2px #1b222b, 0 14px 24px rgba(0,0,0,.18); }
.cartel::before, .cartel::after { content: ""; position: absolute; top: -26px; width: 5px; height: 26px; background: #6b7785; }
.cartel::before { left: 18%; } .cartel::after { right: 18%; }
.cartel-logo { height: 68px; max-width: 150px; object-fit: contain; background: #fff; border-radius: 10px; padding: 5px; }
.cartel-iniciales { width: 68px; height: 68px; border-radius: 12px; background: #fff; color: var(--pizarra); display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; }
.cartel-texto span { display: block; color: #cbd2d9; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.cartel-texto b { font-size: 1.7rem; line-height: 1.1; }

/* escena */
.escena { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; padding: 1rem; border-radius: 18px;
  background: linear-gradient(#262e38, #171d24); border: 3px solid #0f141a; box-shadow: inset 0 2px 12px rgba(0,0,0,.5), 0 8px 20px rgba(0,0,0,.15); }
.elevador { width: 100%; height: auto; display: block; font-family: inherit; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.ev-fondo { fill: #f7f9fb; stroke: #d5dbe1; }
.ev-suelo { fill: var(--suelo); }
.ev-franja { fill: var(--naranja); }
.ev-poste { fill: #566273; }
.ev-viga { fill: var(--pizarra); }
.ev-titulo { fill: #fff; font-size: 19px; font-weight: 800; letter-spacing: .14em; }
.ev-brazo { fill: #e0a526; }
.ev-brazo-borde { fill: #a97a10; }
.car-cristal { fill: url(#g-cristal); stroke: rgba(0,0,0,.25); stroke-width: 1; }
.car-arco { fill: #11161c; } .car-eje { fill: #4b5563; } .car-radios { stroke: #8b97a5; stroke-width: 2; fill: none; }
.car-puerta { stroke: rgba(0,0,0,.28); stroke-width: 1.4; fill: none; } .car-manilla { fill: rgba(0,0,0,.35); } .car-barras { stroke: #2a323c; stroke-width: 3; stroke-linecap: round; fill: none; }
.placa-ue { fill: #1d4ed8; } .placa-e { fill: #fff; font-size: 14px; font-weight: 800; }
.car-faro { fill: #fde68a; } .car-piloto { fill: #ef4444; }
.car-rueda { fill: #1f2933; } .car-llanta { fill: #d5dbe1; }
.slot { cursor: pointer; }
.slot-zona { fill: transparent; }
.slot:hover .slot-zona { fill: rgba(212, 105, 26, .14); }
.placa { fill: #fff; stroke: var(--pizarra); stroke-width: 2.5; }
.placa-txt { font-size: 21px; font-weight: 800; letter-spacing: .08em; fill: var(--pizarra); }
.linea-txt { font-size: 13px; fill: #f1f5f9; font-weight: 700; paint-order: stroke; stroke: rgba(0,0,0,.55); stroke-width: 3px; }
.barra-fondo { fill: rgba(255,255,255,.2); } .barra { fill: var(--ok); transition: width .4s; }
.lampara { fill: var(--naranja); animation: parpadeo 1.4s ease-in-out infinite; }
.hueco-marco { fill: rgba(255,255,255,.07); stroke: #aab4bf; stroke-width: 2.5; stroke-dasharray: 9 7; }
.hueco-mas { fill: var(--naranja); }
.hueco-cruz { stroke: #fff; stroke-width: 3.5; stroke-linecap: round; fill: none; }
.hueco-txt { fill: #d5dbe1; font-size: 17px; font-weight: 700; }
.slot.libre:hover .hueco-marco { stroke: var(--naranja); fill: rgba(212,105,26,.08); }
.slot.libre:hover .hueco-mas { animation: latido .8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.coche-entra { animation: entrar 1s cubic-bezier(.2,.8,.3,1); }
@keyframes entrar { from { transform: translateX(-330px); opacity: 0; } 60% { opacity: 1; } to { transform: translateX(0); } }
@keyframes parpadeo { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes latido { 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .coche-entra, .lampara, .slot.libre:hover .hueco-mas { animation: none; } }

/* estados nuevos */
.e-presupuesto { background: #7c3aed; }
.e-espera { background: #0e7490; }
.e-por_facturar { background: #a16207; }
.e-cancelado { background: #94a3b8; }
.e-hueco { background: var(--pizarra); }
.e-extra { background: #b45309; font-size: .7rem; vertical-align: .1rem; }

/* trabajos */
.tarea { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--borde); flex-wrap: wrap; }
.tarea:last-of-type { border-bottom: 0; }
.tarea-texto { flex: 1; min-width: 160px; font-weight: 600; }
.tarea.hecha .tarea-texto { text-decoration: line-through; color: var(--suave); }
.check { width: 3rem; height: 3rem; border-radius: 12px; border: 3px solid var(--pizarra); background: #fff; color: transparent; display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
.check:disabled { opacity: .5; cursor: default; }
.check.hecho { background: var(--ok); border-color: var(--ok); color: #fff; }
.check .ico { width: 1.6rem; height: 1.6rem; }
.tarea-precio { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.tarea-precio select { width: auto; padding: .5rem; }
.mini { width: 5.2rem; padding: .5rem; text-align: right; }
.importe { min-width: 6rem; text-align: right; font-weight: 700; }
.totales { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; margin-top: .8rem; }
.totales .gran { font-size: 1.3rem; }
.totales b { margin-left: .6rem; }
.linea-pres { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--borde); }

/* documentos */
.doc-logo { max-height: 70px; max-width: 200px; object-fit: contain; display: block; margin-bottom: .4rem; }
.doc-tabla th.der, .doc-tabla td.der, th.der, td.der { text-align: right; }
.doc-totales { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; margin-top: 1rem; }
.doc-totales .gran { font-size: 1.3rem; border-top: 2px solid var(--pizarra); padding-top: .3rem; }
.doc-totales b { margin-left: .8rem; }
.sello-cobrada { display: inline-block; border: 3px solid var(--ok); color: var(--ok); font-weight: 800; text-transform: uppercase; padding: .1rem .6rem; border-radius: 6px; transform: rotate(-6deg); margin-top: .4rem; }
.casilla { display: inline-block; width: 1.1rem; height: 1.1rem; border: 2px solid #000; vertical-align: -0.2rem; margin-right: .3rem; }
.publico-cab { display: flex; align-items: center; gap: .8rem; }
.publico-logo { height: 3.2rem; max-width: 9rem; object-fit: contain; }

/* ---------- taller virtual en 3D, estilo claro y limpio ---------- */
.escena3d-marco { overflow-x: auto; border-radius: 18px; border: 1px solid var(--borde); background: linear-gradient(#fbfbfa, #f1f3f2); box-shadow: 0 8px 24px rgba(30,40,50,.08); }
.escena3d { position: relative; min-width: 680px; width: 100%; min-height: 300px; overflow: hidden; font-size: 14px; touch-action: pan-y; user-select: none; }
.escena3d .lienzo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.escena3d::after { content: "Arrastra para girar la vista"; position: absolute; left: .9em; bottom: .6em; font-size: .78em; color: #7b8794; pointer-events: none; }
.ov { position: absolute; transform: translate(-50%, -50%); z-index: 2; text-decoration: none; color: var(--texto); }
.ov-titulo { background: #fff; color: #3d4a58; border: 1px solid #d5dbe1; border-radius: 999px; padding: .2em .9em;
  font-weight: 800; letter-spacing: .16em; font-size: .85em; white-space: nowrap; pointer-events: none; box-shadow: 0 .15em .5em rgba(30,40,50,.12); }
.ov-calle-titulo { background: #2b3440; color: #fff; border-color: #2b3440; }
.ov-slot.ocupado { display: flex; flex-direction: column; align-items: center; gap: .14em; min-width: 7.6em; padding: .35em .6em .4em;
  background: #fff; border-radius: .8em; box-shadow: 0 .35em 1.1em rgba(30,40,50,.2), 0 0 0 1px rgba(30,40,50,.06); }
.ov-slot.ocupado:hover, .ov-slot.ocupado:focus-visible { box-shadow: 0 .35em 1.1em rgba(30,40,50,.28), 0 0 0 .16em var(--naranja); }
.ov-sitio { font-size: .66em; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #7b8794; }
.ov-placa { display: flex; align-items: stretch; background: #fff; border: .13em solid #1d242c; border-radius: .35em; overflow: hidden; }
.ov-placa i { background: #1d4ed8; color: #fff; font-style: normal; font-weight: 800; font-size: .72em; padding: 0 .4em; display: grid; place-items: center; }
.ov-placa b { color: #1d242c; font-size: 1.1em; letter-spacing: .07em; padding: .02em .45em; }
.ov-modelo { font-size: .8em; font-weight: 700; color: #3d4a58; white-space: nowrap; }
.ov-barra { width: 6em; height: .42em; border-radius: .3em; background: #e3e7ec; overflow: hidden; }
.ov-barra span { display: block; height: 100%; background: var(--ok); transition: width .4s; }
.ov-estado { font-size: .68em; font-weight: 800; color: #fff; border-radius: 999px; padding: .1em .75em; background: #64748b; white-space: nowrap; }
.ov-estado.e-en_reparacion { background: var(--ok); }
.ov-slot.libre { display: flex; flex-direction: column; align-items: center; gap: .15em; color: #3d4a58; padding: .4em .9em .35em;
  border: .13em dashed #9aa5b1; border-radius: 1em; background: rgba(255,255,255,.8); }
.ov-mas { width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--naranja); color: #fff; display: grid; place-items: center; animation: latido 2.4s ease-in-out infinite; }
.ov-mas svg { width: 1.1em; height: 1.1em; }
.ov-libre { font-weight: 700; font-size: .75em; white-space: nowrap; }
.ov-slot.libre:hover { background: #fff; border-color: var(--naranja); }
/* si el aparato no puede dibujar en 3D, las etiquetas pasan a ser tarjetas normales */
.escena3d.sin3d { min-width: 0; height: auto !important; display: flex; flex-wrap: wrap; gap: .8rem; padding: 1rem; align-items: center; justify-content: center; }
.escena3d.sin3d #p-escena { display: contents; }
.escena3d.sin3d .ov { position: static; transform: none; }
.escena3d.sin3d::after { display: none; }
@media (prefers-reduced-motion: reduce) { .ov-mas { animation: none; } }

.casilla-fila { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; margin: .8rem 0; }
.casilla-fila input { width: 1.4rem; height: 1.4rem; margin-top: .1rem; flex: none; }

/* ---------- aspecto más moderno ---------- */
:root { --radio: 16px; --sombra: 0 1px 2px rgba(20,30,40,.05), 0 6px 18px rgba(20,30,40,.07); --sombra-alta: 0 2px 4px rgba(20,30,40,.08), 0 14px 30px rgba(20,30,40,.12); }
body { background: radial-gradient(1200px 500px at 50% -120px, #ffffff, var(--fondo) 70%) fixed; letter-spacing: .005em; }
h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-weight: 750; letter-spacing: -.005em; }
h1 .ico { background: var(--pizarra); color: var(--naranja); padding: .38rem; width: 2.1rem; height: 2.1rem; border-radius: 12px; }

.cab { background: linear-gradient(135deg, #222a34, var(--pizarra) 60%, #364252); border-bottom: 0; box-shadow: 0 2px 14px rgba(20,30,40,.25); position: relative; }
.cab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--naranja), #f0a14d 50%, var(--naranja)); }
.nav { background: #fff; border-bottom: 1px solid var(--borde); position: sticky; top: 0; z-index: 20; }
.nav-in { gap: .25rem; padding: .35rem .6rem; overflow-x: auto; flex-wrap: nowrap; }
.nav a { color: var(--pizarra); border-radius: 999px; padding: .55rem .95rem; white-space: nowrap; font-weight: 650; transition: background .15s, color .15s; }
.nav a:hover { background: #eef1f4; }
.nav a.activo { background: var(--pizarra); color: #fff; }
.nav a.activo .ico { color: var(--naranja); }

.tarjeta, .cifra, .fila, .hoja { border-radius: var(--radio); box-shadow: var(--sombra); border-color: #e3e8ed; }
.tarjeta { padding: 1.2rem; }
.cifra { transition: transform .15s, box-shadow .15s; }
a.cifra:hover { transform: translateY(-2px); box-shadow: var(--sombra-alta); }
.cifra b { font-size: 2rem; letter-spacing: -.02em; }
.fila { transition: transform .15s, box-shadow .15s, border-color .15s; }
.fila:hover { transform: translateY(-1px); box-shadow: var(--sombra-alta); }

.btn { border-radius: 12px; box-shadow: 0 2px 0 var(--naranja2), 0 6px 14px rgba(212,105,26,.25); transition: transform .1s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: 0 0 0 var(--naranja2); }
.btn-sec { box-shadow: 0 2px 0 #1b222b, 0 6px 14px rgba(43,52,64,.2); }
.btn-claro { box-shadow: none; border-width: 1.5px; }
.btn-verde { box-shadow: 0 2px 0 #0f5a2b, 0 6px 14px rgba(21,128,61,.22); }
input, select, textarea { border-width: 1.5px; border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px rgba(212,105,26,.15); }
.badge { letter-spacing: .02em; padding: .25rem .7rem; }
.filtros a { border-width: 1.5px; }
table { font-size: .97rem; }
th { color: var(--suave); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.mensaje-estado { border-radius: var(--radio); }
.tabla-iva td { padding: .65rem .3rem; }
.tabla-iva tr.total td { font-size: 1.25rem; font-weight: 800; border-top: 2px solid var(--pizarra); border-bottom: 0; }
td.der, th.der { text-align: right; }

/* pantalla de acceso */
.acceso { max-width: 440px; margin: 0 auto; padding: 1.6rem 0 .5rem; text-align: center; }
.acceso-logo { width: min(340px, 86%); height: auto; margin: 0 auto 1.2rem; display: block; }
.acceso-caja { text-align: left; padding: 1.5rem; box-shadow: var(--sombra-alta); border-top: 4px solid var(--naranja); }
.acceso-caja h1 { font-size: 1.35rem; }

/* pie con la marca */
.pie-cnm { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.6rem 1rem 2rem; color: var(--suave); font-size: .82rem; }
.pie-cnm img { height: 46px; width: auto; opacity: .92; }
@media (max-width: 560px) { html { font-size: 17px; } .cifra b { font-size: 1.7rem; } }
.acceso-logo, .pie-cnm img { border-radius: 12px; }

/* menú sin barra de desplazamiento: se reparte en filas */
.nav-in { max-width: 1180px; flex-wrap: wrap; overflow: visible; justify-content: center; row-gap: .15rem; }
.nav a { padding: .55rem .8rem; }
@media (max-width: 860px) {
  .nav { position: static; }
  .nav-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: .35rem; padding: .5rem; }
  .nav a { flex-direction: column; justify-content: center; text-align: center; gap: .25rem; padding: .6rem .3rem; font-size: .85rem;
    border-radius: 14px; background: #f3f5f7; line-height: 1.15; }
  .nav a .ico { width: 1.5em; height: 1.5em; }
  .nav a.activo { background: var(--pizarra); }
}
.nav-in { max-width: 1240px; }
.nav a { padding: .55rem .65rem; }
@media (max-width: 860px) {
  .nav-in { grid-template-columns: repeat(5, 1fr); }
  .nav a { padding: .6rem .2rem; }
}
@media (max-width: 560px) { .nav-in { grid-template-columns: repeat(3, 1fr); } }

/* tablas alineadas: contenido centrado en vertical y botones sin margen */
th, td { vertical-align: middle; padding: .7rem .5rem; }
td form { margin: 0; }
td .btn-peq { min-height: 2.2rem; padding: .3rem .8rem; box-shadow: none; }
td .btn-verde.btn-peq { box-shadow: none; }
td:last-child .btn-peq, th:last-child { white-space: nowrap; }
@media (min-width: 861px) and (max-width: 1220px) { .nav a { padding: .55rem .45rem; font-size: .9rem; gap: .3rem; } }
.acceso-logo { border-radius: 18px; box-shadow: var(--sombra-alta); width: min(380px, 92%); }
.pie-cnm img { border-radius: 10px; box-shadow: var(--sombra); }
td.der { white-space: nowrap; }
td form[style*="inline"], td .btn-peq { vertical-align: middle; }
td:nth-last-child(2) { white-space: nowrap; }

/* ---------- avisos al gerente ---------- */
.contador { display: inline-block; min-width: 1.25rem; padding: 0 .35rem; border-radius: 999px; background: #d64545; color: #fff;
  font-size: .75rem; font-weight: 800; line-height: 1.25rem; text-align: center; margin-left: .15rem; }
.contador[hidden] { display: none; }
#toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; display: grid; gap: .6rem; max-width: min(24rem, calc(100vw - 2rem)); }
.toast-aviso { background: #fff; border: 1px solid var(--borde); border-left: 5px solid #2e7d52; border-radius: 14px; padding: .8rem 1rem;
  box-shadow: 0 10px 30px rgba(30,40,50,.22); }
.toast-aviso p { margin: .25rem 0 .6rem; }
.toast-botones { display: flex; gap: .5rem; }
.aviso-fila { display: flex; align-items: center; gap: .8rem; padding: .7rem .4rem; border-bottom: 1px solid var(--borde); color: inherit; text-decoration: none; }
.aviso-fila:last-child { border-bottom: 0; }
.aviso-fila.nuevo { background: #eef7f1; border-radius: 10px; }
.aviso-icono { display: inline-flex; width: 2.2rem; height: 2.2rem; align-items: center; justify-content: center; border-radius: 50%; background: #e3efe8; color: #2e7d52; flex: none; }
.aviso-cuerpo { flex: 1; }
.aviso-cuerpo span { color: var(--suave); }
.fila-botones { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.fila-botones form { margin: 0; }
[hidden] { display: none !important; }
