/* ==========================================================================
   Chimetal · Área de clientes
   Mismo lenguaje visual que chimetal.com: grafito + rojo de marca, Montserrat/Inter.
   ========================================================================== */

.chp-app, .chp-portal {
  --rojo: #C42B2E;
  --rojo-osc: #A01F24;
  --rojo-suave: #FBEDED;
  --acero-950: #101317;
  --acero-900: #161A1F;
  --acero-800: #1F252C;
  --acero-700: #2C343D;
  --acero-500: #5B6570;
  --acero-300: #A3ACB5;
  --gris-50: #F6F7F8;
  --gris-100: #EEF0F2;
  --linea: #DFE3E7;
  --texto: #262B31;
  --texto-2: #59616A;
  --ok: #1E7A46;
  --ok-suave: #E7F4EC;
  --aviso: #9A5700;
  --aviso-borde: #E09A2D;
  --aviso-suave: #FFF5E3;
  --azul: #1F5F99;
  --azul-suave: #E8F1FA;
  --f-titulo: 'Montserrat', system-ui, sans-serif;
  --f-texto: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radio: 4px;
  --sombra-1: 0 1px 2px rgba(16,19,23,.06), 0 2px 8px rgba(16,19,23,.05);
  --sombra-2: 0 12px 32px rgba(16,19,23,.12);
  --ease: cubic-bezier(.22,1,.36,1);
}

/* ---------- Página propia ---------- */
body.chp-app { margin: 0; background: var(--gris-50); color: var(--texto); font: 400 15px/1.55 var(--f-texto); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
body.chp-app #chp-main { flex: 1; }
.chp-app *, .chp-app *::before, .chp-app *::after,
.chp-portal *, .chp-portal *::before, .chp-portal *::after { box-sizing: border-box; }
.chp-app a, .chp-portal a { color: var(--rojo); }
.chp-skip { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 100; }
.chp-skip:focus { left: 8px; }
.chp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chp-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.chp-app :focus-visible, .chp-portal :focus-visible { outline: 2px solid var(--rojo); outline-offset: 2px; }

.chp-bar { background: #fff; border-bottom: 1px solid var(--linea); position: sticky; top: 0; z-index: 50; }
.admin-bar .chp-bar { top: 32px; }
.chp-bar-in { max-width: 1248px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.chp-bar-marca { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.chp-bar-marca img { display: block; height: 40px; width: auto; }
.chp-bar-titulo { font: 700 12px/1 var(--f-titulo); letter-spacing: .14em; text-transform: uppercase; color: var(--acero-900); padding-left: 16px; border-left: 1px solid var(--linea); line-height: 28px; }
.chp-bar-nav { display: flex; align-items: center; gap: 20px; }
.chp-bar-user { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--acero-900); }
.chp-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--rojo-suave); color: var(--rojo); display: inline-flex; align-items: center; justify-content: center; font: 800 14px var(--f-titulo); }
.chp-bar-link { font-size: 14px; font-weight: 500; color: var(--texto-2) !important; text-decoration: none; }
.chp-bar-link:hover { color: var(--rojo) !important; }

.chp-pie { border-top: 1px solid var(--linea); background: #fff; font-size: 13px; color: var(--texto-2); }
.chp-pie-in { max-width: 1248px; margin: 0 auto; padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.chp-pie a { color: var(--texto-2) !important; text-decoration: none; }
.chp-pie a:hover { color: var(--rojo) !important; }
.chp-pie-legal { display: flex; gap: 18px; }

/* ---------- Base del portal ---------- */
.chp-portal { font-family: var(--f-texto); color: var(--texto); font-size: 15px; line-height: 1.55; }
.chp-portal h1, .chp-portal h2, .chp-portal h3 { font-family: var(--f-titulo); color: var(--acero-900); margin: 0; line-height: 1.2; letter-spacing: -.01em; }
.chp-portal p { margin: 0; }
.chp-wrap { max-width: 1248px; margin: 0 auto; padding: 0 24px; }

.chp-eyebrow { display: flex; align-items: center; gap: 12px; font: 700 12px/1 var(--f-titulo); letter-spacing: .16em; text-transform: uppercase; color: var(--rojo); margin: 0 0 14px !important; }
.chp-eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--rojo); }
.chp-eyebrow--claro { color: #fff; }

/* Botones */
.chp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: var(--radio); border: 1px solid transparent; font: 700 13px/1.2 var(--f-titulo); letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, color .2s; white-space: nowrap; }
.chp-btn .chp-ico { width: 17px; height: 17px; }
.chp-btn--pri { background: var(--rojo); color: #fff !important; }
.chp-btn--pri:hover { background: var(--rojo-osc); }
.chp-btn--sec { background: #fff; border-color: var(--linea); color: var(--acero-900) !important; }
.chp-btn--sec:hover { border-color: var(--rojo); color: var(--rojo) !important; }
.chp-btn--aviso { background: var(--aviso); color: #fff !important; }
.chp-btn--aviso:hover { background: #7d4700; }
.chp-btn--ok { background: var(--ok); color: #fff !important; }
.chp-btn--ok:hover { background: #17623a; }
.chp-btn--bloque { width: 100%; }

/* ---------- Banda superior ---------- */
.chp-banda {
  color: #fff;
  background: linear-gradient(90deg, rgba(16,19,23,.96) 0%, rgba(16,19,23,.88) 55%, rgba(16,19,23,.62) 100%), var(--chp-foto, none) center 40% / cover no-repeat, var(--acero-900);
}
.chp-banda > .chp-banda-in { max-width: 1248px; margin: 0 auto; padding: 44px 24px 92px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 40px; flex-wrap: wrap; }
.chp-banda h1 { color: #fff !important; font-size: clamp(28px, 3.8vw, 42px); font-weight: 800; overflow-wrap: anywhere; }
.chp-banda-sub { color: rgba(255,255,255,.78); font-size: 16px; margin-top: 10px !important; max-width: 620px; }
.chp-banda-volver { display: inline-block; color: rgba(255,255,255,.75) !important; text-decoration: none; font-size: 14px; margin-bottom: 18px; }
.chp-banda-volver:hover { color: #fff !important; }
.chp-banda-estado .chp-badge { font-size: 14px; padding: 9px 16px; }
.chp-banda + .chp-wrap { position: relative; margin-top: -52px; }

.chp-buscar { display: flex; align-items: center; background: #fff; border-radius: var(--radio); padding: 4px; box-shadow: var(--sombra-2); min-width: min(380px, 100%); }
.chp-buscar .chp-ico { color: var(--acero-500); margin: 0 4px 0 10px; width: 18px; height: 18px; }
.chp-buscar input { flex: 1; min-width: 0; border: 0; padding: 10px 8px; font: 500 15px var(--f-texto); color: var(--texto); background: transparent; }
.chp-buscar input:focus { outline: none; }
.chp-buscar:focus-within { box-shadow: var(--sombra-2), 0 0 0 2px var(--rojo); }
.chp-buscar button { border: 0; background: var(--rojo); color: #fff; font: 700 13px var(--f-titulo); padding: 11px 18px; border-radius: 3px; cursor: pointer; }
.chp-buscar button:hover { background: var(--rojo-osc); }

/* ---------- Filtros (tarjetas) ---------- */
.chp-filtros { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.chp-filtro { position: relative; display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 18px 20px; text-decoration: none; box-shadow: var(--sombra-1); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.chp-filtro:hover { border-color: var(--acero-300); transform: translateY(-1px); }
.chp-filtro .n { font: 800 28px/1 var(--f-titulo); color: var(--acero-900); }
.chp-filtro .l { font-size: 13.5px; font-weight: 500; color: var(--texto-2); }
.chp-filtro[aria-current="page"] { border-color: var(--acero-900); box-shadow: inset 0 3px 0 var(--rojo), var(--sombra-1); }
.chp-filtro.es-aviso .n { color: var(--aviso); }
.chp-filtro.es-aviso::after, .chp-filtro.es-ok::after { content: ''; position: absolute; top: 16px; right: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--aviso-borde); box-shadow: 0 0 0 4px var(--aviso-suave); }
.chp-filtro.es-ok .n { color: var(--ok); }
.chp-filtro.es-ok::after { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-suave); }

/* ---------- Avisos que requieren acción ---------- */
.chp-accion { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--radio); margin-bottom: 12px; border: 1px solid; border-left-width: 4px; }
.chp-accion > .chp-ico { width: 24px; height: 24px; }
.chp-accion > div { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.chp-accion strong { font: 700 15px var(--f-titulo); }
.chp-accion span { font-size: 14px; color: var(--texto-2); }
.chp-accion .chp-accion-links { flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
.chp-accion-links a { font: 700 14px var(--f-titulo); text-decoration: none; white-space: nowrap; }
.chp-accion--aviso { background: var(--aviso-suave); border-color: #F3D9AE; border-left-color: var(--aviso-borde); }
.chp-accion--aviso > .chp-ico, .chp-accion--aviso strong, .chp-accion--aviso .chp-accion-links a { color: var(--aviso) !important; }
.chp-accion--ok { background: var(--ok-suave); border-color: #C6E5D2; border-left-color: var(--ok); }
.chp-accion--ok > .chp-ico, .chp-accion--ok strong, .chp-accion--ok .chp-accion-links a { color: var(--ok) !important; }
.chp-accion--envio { background: var(--azul-suave); border-color: #C9DDF0; border-left-color: var(--azul); }
.chp-accion--envio > .chp-ico, .chp-accion--envio strong, .chp-accion--envio .chp-accion-links a { color: var(--azul) !important; }
.chp-dd-sub { display: block; font-weight: 400; font-size: 13px; color: var(--texto-2); white-space: pre-line; }
.chp-falta-imgs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chp-falta-imgs a { display: block; border-radius: 6px; overflow: hidden; border: 1px solid #F3D9AE; background: #fff; transition: box-shadow .2s; }
.chp-falta-imgs a:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.chp-falta-imgs img { display: block; width: 180px; height: 135px; object-fit: cover; }
.chp-accion--anulado { background: var(--gris-50); border-color: var(--linea); border-left-color: var(--acero-700); }
.chp-accion--anulado > .chp-ico, .chp-accion--anulado strong { color: var(--acero-800) !important; }
.chp-accion--grande { align-items: flex-start; padding: 22px 24px; margin-bottom: 20px; }
.chp-accion--grande > .chp-ico { margin-top: 2px; }
.chp-accion--grande strong { font-size: 17px; }
.chp-falta { margin: 10px 0 4px !important; padding: 12px 16px; background: #fff; border-radius: var(--radio); border: 1px solid #F3D9AE; color: var(--texto); font-size: 15px; line-height: 1.6; }
.chp-accion-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px !important; }

/* ---------- Listado ---------- */
.chp-lista-cab, .chp-fila { display: grid; grid-template-columns: minmax(0, 2.3fr) 104px minmax(0, 1.5fr) 132px 20px; align-items: center; gap: 20px; }
.chp-lista-cab { padding: 8px 24px 10px 27px; font: 700 11px var(--f-titulo); letter-spacing: .1em; text-transform: uppercase; color: var(--acero-500); }
.chp-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chp-leyenda { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 18px; margin: 14px 0 64px; font-size: 12.5px; color: var(--texto-2); }
.chp-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.chp-leyenda .chp-mini-doc { width: 22px; height: 22px; font-size: 9px; }
.chp-fila { background: #fff; border: 1px solid var(--linea); border-left: 3px solid var(--acero-300); border-radius: var(--radio); padding: 18px 24px; text-decoration: none; color: var(--texto) !important; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.chp-fila:hover { box-shadow: var(--sombra-2); transform: translateY(-1px); border-color: var(--acero-300); }
.chp-fila:hover .chp-fila-ir { color: var(--rojo); transform: translateX(3px); }
.chp-fila--falta_definir { border-left-color: var(--aviso-borde); }
.chp-fila--fabricando { border-left-color: var(--rojo); }
.chp-fila--preparando { border-left-color: var(--azul); }
.chp-fila--listo_recogida { border-left-color: var(--ok); }
.chp-fila--recogido { border-left-color: var(--linea); background: #FCFCFD; }
.chp-fila--recogido .chp-fila-num { color: var(--acero-700); }
.chp-fila--pendiente_verificacion { border-left-color: #7B5FC9; }
.chp-fila--anulado { border-left-color: var(--acero-700); background: #FCFCFD; }
.chp-fila--anulado .chp-fila-num { color: var(--acero-500); text-decoration: line-through; }
.chp-fila-pedido { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chp-fila-num { font: 700 16px var(--f-titulo); color: var(--acero-900); }
.chp-fila-ref { font-size: 13.5px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chp-fila-fecha { font-size: 14px; color: var(--texto-2); font-variant-numeric: tabular-nums; }
.chp-mov { display: none; }
.chp-fila-estado { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.chp-fila-docs { display: flex; gap: 4px; }
.chp-fila-ir { color: var(--acero-300); display: flex; transition: transform .2s var(--ease), color .2s; }

.chp-barra { display: flex; gap: 3px; width: 140px; }
.chp-barra i { flex: 1; height: 4px; border-radius: 2px; background: var(--gris-100); }
.chp-barra i.on { background: var(--rojo); }
.chp-fila--listo_recogida .chp-barra i.on, .chp-fila--recogido .chp-barra i.on { background: var(--ok); }

.chp-mini-doc { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; font: 700 10px var(--f-titulo); border: 1px dashed var(--linea); color: var(--acero-300); }
.chp-mini-doc.si { border: 1px solid var(--acero-800); background: var(--acero-800); color: #fff; }

/* Estados */
.chp-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font: 700 12px/1.2 var(--f-titulo); white-space: nowrap; background: var(--gris-100); color: var(--acero-700); }
.chp-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.chp-badge--falta_definir { background: var(--aviso-suave); color: var(--aviso); }
.chp-badge--pendiente_fabricacion { background: var(--gris-100); color: var(--acero-700); }
.chp-badge--fabricando { background: var(--rojo-suave); color: var(--rojo-osc); }
.chp-badge--preparando { background: var(--azul-suave); color: var(--azul); }
.chp-badge--listo_recogida { background: var(--ok); color: #fff; }
.chp-badge--recogido { background: var(--ok-suave); color: var(--ok); }
.chp-badge--pendiente_verificacion { background: #EFEAFB; color: #5B3FA8; }
.chp-badge--anulado { background: var(--acero-700); color: #fff; }

/* Vacíos */
.chp-vacio { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); text-align: center; padding: 56px 24px; margin-bottom: 64px; box-shadow: var(--sombra-1); }
.chp-vacio > .chp-ico { width: 44px; height: 44px; color: var(--acero-300); stroke-width: 1.5; margin-bottom: 12px; }
.chp-vacio h2 { font-size: 21px; margin-bottom: 8px; }
.chp-vacio p { color: var(--texto-2); max-width: 520px; margin: 0 auto 20px !important; }
.chp-vacio--mini { padding: 32px 24px; box-shadow: none; }

/* ---------- Ficha del pedido ---------- */
.chp-ficha { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.chp-ficha-main, .chp-ficha-side { display: grid; gap: 20px; min-width: 0; }
.chp-ficha-side { position: sticky; top: 92px; }
.chp-card { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 26px 28px; box-shadow: var(--sombra-1); }
.chp-card-t { position: relative; display: flex; justify-content: space-between; align-items: baseline; font-size: 17px !important; font-weight: 700; padding-bottom: 14px; margin-bottom: 22px !important; border-bottom: 1px solid var(--linea); }
.chp-card-t::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 40px; height: 2px; background: var(--rojo); }
.chp-card-n { font: 600 13px var(--f-texto); color: var(--texto-2); }

/* Pasos */
.chp-pasos { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.chp-pasos li { position: relative; text-align: center; padding: 0 6px; }
.chp-pasos li::before { content: ''; position: absolute; top: 19px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 3px; border-radius: 2px; background: var(--gris-100); }
.chp-pasos li:first-child::before { display: none; }
.chp-pasos li.hecho::before, .chp-pasos li.actual::before { background: var(--rojo); }
.chp-pasos .punto { position: relative; display: inline-flex; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center; background: #fff; border: 2px solid var(--linea); color: var(--acero-500); font: 700 14px var(--f-titulo); }
.chp-pasos .punto .chp-ico { width: 18px; height: 18px; stroke-width: 2.6; }
.chp-pasos .txt { display: block; margin-top: 10px; font-size: 13px; color: var(--texto-2); line-height: 1.35; }
.chp-pasos .txt small { display: block; margin-top: 3px; font-size: 12px; color: var(--acero-500); font-variant-numeric: tabular-nums; }
.chp-pasos li.hecho .punto { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.chp-pasos li.actual .punto { border-color: var(--rojo); color: var(--rojo); box-shadow: 0 0 0 6px var(--rojo-suave); }
.chp-pasos li.actual .txt { color: var(--acero-900); font-weight: 700; }
.chp-pasos li[class] .punto { transition: box-shadow .3s; }
.chp-pasos.en-espera li .punto { border-style: dashed; }
.chp-pasos.anulado { opacity: .45; filter: grayscale(1); }
/* Últimos pasos en verde (listo / recogido) */
.chp-pasos:has(li:nth-child(4).actual, li:nth-child(5).actual) li.hecho .punto { background: var(--ok); border-color: var(--ok); }
.chp-pasos:has(li:nth-child(4).actual, li:nth-child(5).actual) li.hecho::before,
.chp-pasos:has(li:nth-child(4).actual, li:nth-child(5).actual) li.actual::before { background: var(--ok); }
.chp-pasos:has(li:nth-child(4).actual, li:nth-child(5).actual) li.actual .punto { border-color: var(--ok); color: var(--ok); box-shadow: 0 0 0 6px var(--ok-suave); }
.chp-pasos li:nth-child(5).actual .punto { background: var(--ok); color: #fff; }

.chp-estado-desc { text-align: center; color: var(--texto-2); margin-top: 26px !important; padding-top: 18px; border-top: 1px dashed var(--linea); }
.chp-notas { display: flex; gap: 12px; margin-top: 18px; padding: 14px 16px; background: var(--azul-suave); border-radius: var(--radio); }
.chp-notas > .chp-ico { color: var(--azul); margin-top: 1px; }
.chp-notas strong { font: 700 14px var(--f-titulo); color: var(--azul); }
.chp-notas p { margin-top: 3px !important; }

/* Documentos */
.chp-docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chp-doc { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--linea); border-radius: var(--radio); transition: border-color .2s; }
.chp-doc:not(.pendiente):hover { border-color: var(--acero-300); }
.chp-doc-ico { flex: 0 0 auto; width: 40px; height: 48px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px; background: var(--rojo); color: #fff; font: 800 10px var(--f-titulo); letter-spacing: .04em; border-radius: 3px; clip-path: polygon(0 0, 70% 0, 100% 22%, 100% 100%, 0 100%); }
.chp-doc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chp-doc-txt strong { font: 700 15px var(--f-titulo); color: var(--acero-900); }
.chp-doc-txt span { font-size: 12.5px; color: var(--texto-2); }
.chp-doc-acc { display: flex; gap: 6px; }
.chp-doc-acc a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; min-width: 36px; padding: 0 10px; border: 1px solid var(--linea); border-radius: var(--radio); color: var(--acero-800) !important; text-decoration: none; font: 600 13px var(--f-titulo); }
.chp-doc-acc a .chp-ico { width: 17px; height: 17px; }
.chp-doc-acc a span { display: none; }
.chp-doc-acc a:hover { border-color: var(--rojo); color: var(--rojo) !important; background: var(--rojo-suave); }
.chp-doc.pendiente { background: var(--gris-50); border-style: dashed; }
.chp-doc.pendiente .chp-doc-ico { background: var(--gris-100); color: var(--acero-300); }
.chp-doc.pendiente strong { color: var(--acero-500); }

/* Historial */
.chp-hist { list-style: none; margin: 0; padding: 0; }
.chp-hist li { position: relative; display: flex; justify-content: space-between; gap: 16px; padding: 0 0 18px 26px; }
.chp-hist li:last-child { padding-bottom: 0; }
.chp-hist li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--acero-300); z-index: 1; }
.chp-hist li::after { content: ''; position: absolute; left: 9px; top: 14px; bottom: -6px; width: 2px; background: var(--gris-100); }
.chp-hist li:last-child::after { display: none; }
.chp-hist li.ultimo::before { border-color: var(--rojo); background: var(--rojo); box-shadow: 0 0 0 4px var(--rojo-suave); }
.chp-hist li.ultimo .e { font-weight: 700; color: var(--acero-900); }
.chp-hist .e { color: var(--texto); }
.chp-hist .f { font-size: 13px; color: var(--acero-500); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Lateral */
.chp-resumen { margin: 0; display: grid; gap: 0; }
.chp-resumen > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gris-100); }
.chp-resumen dd .chp-badge { white-space: normal; }
.chp-resumen > div:last-child { border-bottom: 0; padding-bottom: 0; }
.chp-resumen > div:first-child { padding-top: 0; }
.chp-resumen dt { font-size: 13px; color: var(--texto-2); }
.chp-resumen dd { margin: 0; font-weight: 600; color: var(--acero-900); overflow-wrap: anywhere; }
.chp-ayuda { background: var(--acero-900); border-color: var(--acero-900); color: rgba(255,255,255,.8); }
.chp-ayuda .chp-card-t { color: #fff; border-bottom-color: rgba(255,255,255,.12); }
.chp-ayuda p { font-size: 14px; }
.chp-ayuda strong { color: #fff; }
.chp-ayuda-tel { display: flex; align-items: center; gap: 10px; margin: 16px 0; font: 800 22px var(--f-titulo); color: #fff !important; text-decoration: none; }
.chp-ayuda-tel .chp-ico { color: var(--rojo); width: 22px; height: 22px; }
.chp-ayuda-horario { margin-top: 12px !important; font-size: 12.5px !important; color: rgba(255,255,255,.55); text-align: center; }
.chp-volver { margin: 28px auto 64px !important; }
.chp-volver a { font-weight: 600; text-decoration: none; font-size: 14px; }

/* ---------- Acceso ---------- */
.chp-login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: calc(100vh - 68px - 62px); }
.chp-login-intro { display: flex; align-items: center; background-position: center 40%; }
.chp-login-intro-in { padding: 64px clamp(24px, 6vw, 88px); max-width: 640px; margin-left: auto; }
.chp-login-intro h1 { color: #fff !important; font-size: clamp(32px, 4vw, 50px); font-weight: 800; line-height: 1.08; margin-bottom: 16px !important; }
.chp-login-intro h1 span { color: var(--rojo); display: block; }
.chp-login-lead { color: rgba(255,255,255,.78); font-size: 17px; max-width: 46ch; }
.chp-ventajas { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 18px; }
.chp-ventajas li { display: flex; gap: 14px; align-items: flex-start; }
.chp-ventajas .chp-ico { width: 40px; height: 40px; padding: 9px; border-radius: var(--radio); background: rgba(196,43,46,.18); color: #fff; stroke: #F08A8C; }
.chp-ventajas strong { display: block; font: 700 15px var(--f-titulo); color: #fff; }
.chp-ventajas span { font-size: 14px; color: rgba(255,255,255,.65); }
.chp-login-form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--gris-50); }
.chp-login-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--linea); border-top: 4px solid var(--rojo); border-radius: var(--radio); padding: 36px 36px 30px; box-shadow: var(--sombra-2); }
.chp-login-card h2 { font-size: 24px; font-weight: 800; }
.chp-login-sub { color: var(--texto-2); font-size: 14px; margin: 6px 0 24px !important; }
.chp-login-card form p { margin: 0 0 16px !important; }
.chp-login-card label { display: block; font: 600 13px var(--f-texto); color: var(--acero-900); margin-bottom: 6px; }
.chp-login-card input[type=text], .chp-login-card input[type=password] { width: 100%; padding: 12px 14px; border: 1px solid var(--linea); border-radius: var(--radio); font: 15px var(--f-texto); color: var(--texto); background: #fff; transition: border-color .2s, box-shadow .2s; }
.chp-login-card input[type=text]:focus, .chp-login-card input[type=password]:focus { outline: none; border-color: var(--rojo); box-shadow: 0 0 0 3px var(--rojo-suave); }
.chp-login-card .login-remember label { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--texto-2); cursor: pointer; }
.chp-login-card .login-remember input { width: 16px; height: 16px; accent-color: var(--rojo); }
.chp-login-card input[type=submit] { width: 100%; padding: 14px; border: 0; border-radius: var(--radio); background: var(--rojo); color: #fff; font: 700 15px var(--f-titulo); cursor: pointer; transition: background .2s; }
.chp-login-card input[type=submit]:hover { background: var(--rojo-osc); }
.chp-login-olvido { text-align: center; font-size: 14px; }
.chp-login-olvido a { text-decoration: none; font-weight: 500; }
.chp-login-cookies { margin: 18px 0 0 !important; padding: 12px 14px; background: var(--gris-50); border-radius: var(--radio); font-size: 12.5px; line-height: 1.5; color: var(--texto-2); }
.chp-login-cookies strong { color: var(--acero-900); }
.chp-login-cookies a { color: var(--rojo); white-space: nowrap; }
.chp-login-ayuda { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--linea); font-size: 13.5px; color: var(--texto-2); display: flex; flex-direction: column; gap: 2px; }
.chp-login-ayuda strong { color: var(--acero-900); }
.chp-login-ayuda a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.chp-msg { padding: 12px 14px; border-radius: var(--radio); font-size: 14px; margin-bottom: 18px; }
.chp-msg--error { background: var(--rojo-suave); color: var(--rojo-osc); border: 1px solid #F1C6C7; }
.chp-msg--ok { background: var(--ok-suave); color: #155433; border: 1px solid #C6E5D2; }

/* Dentro de un tema (shortcode sin página propia) */
.chp-portal:not(.chp-app .chp-portal) .chp-login { min-height: 0; }

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .chp-ficha { grid-template-columns: minmax(0, 1fr); }
  .chp-ficha-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chp-lista-cab { display: none; }
  .chp-fila { grid-template-columns: minmax(0, 1fr) auto 20px; grid-template-areas: "pedido estado ir" "fecha docs ir"; gap: 10px 20px; }
  .chp-fila-pedido { grid-area: pedido; } .chp-fila-estado { grid-area: estado; align-items: flex-end; }
  .chp-fila-fecha { grid-area: fecha; } .chp-fila-docs { grid-area: docs; justify-content: flex-end; }
  .chp-fila-ir { grid-area: ir; }
  .chp-mov { display: inline; }
}

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
  .chp-login { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .chp-login-intro-in { padding: 40px 20px 36px; margin: 0; }
  .chp-ventajas { margin-top: 24px; gap: 14px; }
  .chp-login-form { padding: 28px 16px 48px; }
  .chp-login-card { padding: 28px 22px 24px; }
}
@media (max-width: 720px) {
  .chp-wrap, .chp-banda > .chp-banda-in, .chp-bar-in, .chp-pie-in { padding-left: 16px; padding-right: 16px; }
  .chp-bar-in { height: 60px; }
  .chp-bar-marca img { height: 34px; }
  .chp-bar-titulo { display: none; }
  .chp-bar-nombre { display: none; }
  .chp-bar-nav { gap: 12px; }
  .chp-banda > .chp-banda-in { padding-top: 32px; padding-bottom: 80px; }
  .chp-buscar { width: 100%; min-width: 0; }
  .chp-banda + .chp-wrap { margin-top: -44px; }

  .chp-filtros { display: flex; overflow-x: auto; gap: 8px; margin: 0 -16px 16px; padding: 0 16px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .chp-filtros::-webkit-scrollbar { display: none; }
  .chp-filtro { flex: 0 0 auto; min-width: 118px; padding: 14px 16px; scroll-snap-align: start; }
  .chp-filtro .n { font-size: 24px; }

  .chp-accion { flex-wrap: wrap; align-items: flex-start; gap: 10px 14px; padding: 14px 16px; }
  .chp-accion > div { flex-basis: calc(100% - 40px); }
  .chp-accion .chp-accion-links { flex-basis: 100%; padding-left: 38px; }
  .chp-accion--grande .chp-accion-cta .chp-btn { flex: 1; }

  .chp-fila { grid-template-columns: minmax(0, 1fr) 20px; grid-template-areas: "pedido ir" "estado ir" "fecha docs"; padding: 16px 16px 14px; gap: 12px 12px; }
  .chp-fila-estado { align-items: flex-start; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
  .chp-fila-docs { grid-column: 1 / -1; grid-row: 3; justify-content: flex-end; }
  .chp-fila-fecha { grid-row: 3; grid-column: 1; align-self: center; font-size: 13px; }
  .chp-barra { width: 100px; }

  .chp-card { padding: 20px 18px; }
  .chp-ficha-side { grid-template-columns: minmax(0, 1fr); }
  .chp-accion--grande .chp-accion-cta .chp-btn { white-space: normal; text-align: center; }
  .chp-doc { flex-wrap: wrap; }
  .chp-doc-acc { width: 100%; padding-left: 54px; }
  .chp-doc-acc a { flex: 1; }
  .chp-pasos { grid-template-columns: 1fr; gap: 0; margin-top: 0; }
  .chp-pasos li { display: flex; align-items: center; gap: 14px; text-align: left; padding: 7px 0; }
  .chp-pasos li::before { top: -7px; left: 18.5px; right: auto; width: 3px; height: 14px; }
  .chp-pasos li:first-child::before { display: none; }
  .chp-pasos .txt { margin: 0; }
  .chp-estado-desc { text-align: left; }
  .chp-docs { grid-template-columns: 1fr; }
  .chp-doc-acc a span { display: inline; }
  .chp-hist li { flex-direction: column; gap: 1px; }
  .chp-resumen > div { grid-template-columns: 110px 1fr; }
  .chp-pie-in { flex-direction: column; }
}
