/* El Tiendazo · panel administrativo con el lenguaje visual de MarketPro
   (tipografía, colores --main-*, radios de 8/12/16 px, bordes gray-100, iconos Phosphor). */

:root { --tzp-lateral: 268px; --tzp-fondo: #f4f6f9; --tzp-borde: #e9ecf1; }
body.tzp { background: var(--tzp-fondo); overflow-x: hidden; font-size: 15px; }
.tzp .text-xs { font-size: 12px; }
.tzp .rounded-12 { border-radius: 12px; }
.tzp .lh-sm { line-height: 1.25; }

/* ---------------------------------------------------------------- lateral */
.tzp-lateral {
  position: fixed; inset: 0 auto 0 0; width: var(--tzp-lateral); background: #fff; border-right: 1px solid var(--tzp-borde);
  display: flex; flex-direction: column; z-index: 1040; transition: transform .25s ease;
}
.tzp-lateral__cabeza { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 12px; }
.tzp-lateral__cerrar { font-size: 22px; color: #667085; background: none; border: 0; }
.tzp-alcance { margin: 4px 16px 8px; padding: 8px 12px; border-radius: 10px; background: #f2f4f7; color: #475467;
  font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tzp-alcance--central { background: var(--main-50); color: var(--main-700); }
.tzp-alcance span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tzp-menu { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.tzp-menu__seccion { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #98a2b3; font-weight: 600;
  padding: 16px 12px 6px; }
.tzp-menu__enlace { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #344054;
  font-weight: 500; position: relative; transition: background .15s, color .15s; }
.tzp-menu__enlace i { font-size: 20px; color: #667085; transition: color .15s; }
.tzp-menu__enlace:hover { background: #f5f7fa; color: var(--main-600); }
.tzp-menu__enlace:hover i { color: var(--main-600); }
.tzp-menu__enlace.activo { background: var(--main-50); color: var(--main-700); font-weight: 600; }
.tzp-menu__enlace.activo i { color: var(--main-600); }
.tzp-menu__enlace.activo::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--main-600); }
.tzp-lateral__pie { border-top: 1px solid var(--tzp-borde); padding: 12px; }
.tzp-velo { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); z-index: 1035; opacity: 0; visibility: hidden;
  transition: opacity .2s; }

/* ---------------------------------------------------------------- principal */
.tzp-principal { margin-left: var(--tzp-lateral); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.tzp-principal--solo { margin-left: 0; }
.tzp-barra { position: sticky; top: 0; z-index: 1020; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--tzp-borde); display: flex; align-items: center; gap: 16px; padding: 12px 28px; min-height: 72px; }
.tzp-barra__boton { font-size: 26px; color: #344054; background: none; border: 0; display: flex; }
.tzp-barra__titulo { flex: 1; }
.tzp-titulo { font-size: 20px; margin: 0; font-weight: 700; color: hsl(var(--heading-color, 235 49% 14%)); }
.tzp-buscar { position: relative; width: min(360px, 32vw); }
.tzp-buscar i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #98a2b3; font-size: 18px; }
.tzp-buscar input { width: 100%; border: 1px solid var(--tzp-borde); background: #f8f9fb; border-radius: 999px;
  padding: 10px 16px 10px 40px; font-size: 14px; outline: none; transition: .15s; }
.tzp-buscar input:focus { border-color: var(--main-600); background: #fff; box-shadow: 0 0 0 3px var(--main-100); }
.tzp-usuario { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px; border-radius: 12px; }
.tzp-usuario:hover { background: #f5f7fa; }
.tzp-usuario__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--main-600); color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.tzp-contenido { padding: 24px 28px 40px; width: 100%; max-width: 1600px; }
.tzp-contenido.pb-0 { padding-bottom: 0; }

@media (max-width: 1199.98px) {
  .tzp-lateral { transform: translateX(-100%); box-shadow: none; }
  .tzp-principal { margin-left: 0; }
  body.tzp-menu-abierto .tzp-lateral { transform: none; box-shadow: 0 10px 40px rgba(16, 24, 40, .2); }
  body.tzp-menu-abierto .tzp-velo { opacity: 1; visibility: visible; }
  body.tzp-menu-abierto { overflow: hidden; }
}
@media (max-width: 767.98px) {
  .tzp-barra { padding: 10px 16px; gap: 10px; min-height: 64px; }
  .tzp-contenido { padding: 16px 14px 32px; }
  .tzp-titulo { font-size: 18px; }
}

/* ---------------------------------------------------------------- tarjetas y KPIs */
.tzp-tarjeta { background: #fff; border: 1px solid var(--tzp-borde); border-radius: 16px; padding: 24px; }
.tzp-tarjeta--sin-padding { padding: 0; overflow: hidden; overflow: clip; }
.tzp-tarjeta__cabeza { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 20px; }
.tzp-tarjeta--sin-padding .tzp-tarjeta__cabeza { padding: 20px 24px 0; }
.tzp-tarjeta__titulo { font-size: 17px; font-weight: 700; margin: 0; color: hsl(var(--heading-color, 235 49% 14%)); }
@media (max-width: 575.98px) { .tzp-tarjeta { border-radius: 12px; } .tzp-tarjeta:not(.tzp-tarjeta--sin-padding) { padding: 16px; }
  .tzp-tarjeta--sin-padding > .tzp-filtros { padding-left: 16px !important; padding-right: 16px !important; }
  .tzp-tarjeta--sin-padding .tzp-tarjeta__cabeza { padding: 16px 16px 0; } }

.tzp-kpi { background: #fff; border: 1px solid var(--tzp-borde); border-radius: 16px; padding: 20px; display: flex;
  gap: 16px; align-items: flex-start; height: 100%; transition: border-color .15s, transform .15s; color: inherit; }
a.tzp-kpi:hover { border-color: var(--main-600); transform: translateY(-2px); }
.tzp-kpi__icono { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0; background: var(--main-50); color: var(--main-600); }
.tzp-kpi__icono--naranja { background: #fff4e5; color: #dc6803; }
.tzp-kpi__icono--azul { background: #e8f1fd; color: #1570ef; }
.tzp-kpi__icono--violeta { background: #f1ecfd; color: #7a5af8; }
.tzp-kpi__icono--rojo { background: #fdecec; color: #d92d20; }
.tzp-kpi__valor { font-size: 24px; font-weight: 700; color: hsl(var(--heading-color, 235 49% 14%)); line-height: 1.2; }
.tzp-kpi__texto { color: #667085; font-size: 13px; font-weight: 500; }
.tzp-variacion { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.tzp-variacion--sube { background: #e7f6ec; color: #087443; }
.tzp-variacion--baja { background: #fdecec; color: #b42318; }

/* gráfico de barras sin librerías */
.tzp-barras { display: grid; grid-template-columns: repeat(14, 1fr); gap: 8px; align-items: end; height: 220px;
  padding-top: 12px; }
.tzp-barras__col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end;
  min-width: 0; }
.tzp-barras__barra { width: 100%; max-width: 38px; border-radius: 8px 8px 4px 4px; background: var(--main-200);
  min-height: 4px; position: relative; transition: background .15s; }
.tzp-barras__col:hover .tzp-barras__barra, .tzp-barras__col:last-child .tzp-barras__barra { background: var(--main-600); }
.tzp-barras__dia { font-size: 11px; color: #98a2b3; white-space: nowrap; }
.tzp-barras__barra[data-valor]:hover::after { content: attr(data-valor); position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); background: #101828; color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 6px;
  white-space: nowrap; z-index: 2; }
@media (max-width: 575.98px) { .tzp-barras { gap: 3px; height: 160px; } .tzp-barras__dia { font-size: 9px; }
  .tzp-barras__col:nth-child(odd) .tzp-barras__dia { visibility: hidden; } }
.tzp-progreso { height: 8px; border-radius: 4px; background: #f2f4f7; overflow: hidden; }
.tzp-progreso > span { display: block; height: 100%; background: var(--main-600); border-radius: 4px; }

/* ---------------------------------------------------------------- tablas */
.tzp-tabla-envoltura { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tzp-tabla { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tzp-tabla th { background: #f8f9fb; color: #667085; font-weight: 600; font-size: 12px; text-transform: uppercase;
  letter-spacing: .04em; padding: 12px 16px; border-bottom: 1px solid var(--tzp-borde); white-space: nowrap; text-align: left; }
.tzp-tabla td { padding: 14px 16px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; color: #344054; }
.tzp-tabla tbody tr:last-child td { border-bottom: 0; }
.tzp-tabla tbody tr:hover td { background: #fafbfc; }
.tzp-tabla .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tzp-tabla .centro { text-align: center; }
.tzp-tabla a.tzp-enlace { color: hsl(var(--heading-color, 235 49% 14%)); font-weight: 600; }
/* En pantallas estrechas la tabla se desplaza en horizontal en lugar de partir palabras letra a letra. */
.tzp-tabla th, .tzp-tabla td { word-break: normal; overflow-wrap: normal; }
.tzp-tabla .tzp-mono, .tzp-tabla .badge, .tzp-tabla .tz-badge { white-space: nowrap; }
.tzp-tabla td { min-width: 0; }
@media (max-width: 767px) { .tzp-tabla td, .tzp-tabla th { padding: 12px; } }
.tzp-tabla a.tzp-enlace:hover { color: var(--main-600); }
.tzp-tabla .tzp-celda-producto { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.tzp-miniatura { width: 44px; height: 44px; border-radius: 8px; background: #f5f7fa; display: flex; align-items: center;
  justify-content: center; overflow: hidden; flex-shrink: 0; color: #98a2b3; font-size: 20px; }
.tzp-miniatura img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tzp-tabla input.common-input, .tzp-tabla select.common-input { padding: 6px 10px; font-size: 14px; min-width: 84px; height: 38px; }
.tzp-tabla tr.cambiado td { background: #fffbeb !important; }
.tzp-texto-sec { color: #667085; font-size: 13px; }
.tzp-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.tzp-vacio { text-align: center; padding: 48px 16px; color: #667085; }
.tzp-vacio i { font-size: 48px; color: #d0d5dd; display: block; margin-bottom: 8px; }

/* ---------------------------------------------------------------- filtros y pestañas */
.tzp-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tzp-filtros .common-input { height: 42px; padding: 8px 14px; font-size: 14px; width: auto; min-width: 150px; }
.tzp-filtros input[type=search].common-input { min-width: 220px; }
@media (max-width: 575.98px) { .tzp-filtros > * { flex: 1 1 100%; } .tzp-filtros .common-input { width: 100%; } }
/* Pestañas: si no caben se desplazan en horizontal sin barras visibles (en Windows salían dos barras);
   un degradado en el borde avisa de que hay más (panel.js pone .desborda-izq / .desborda-der). */
.tzp-pestanas { display: flex; gap: 4px; box-shadow: inset 0 -1px 0 var(--tzp-borde); overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none; margin-bottom: 20px; scroll-behavior: smooth; }
.tzp-pestanas::-webkit-scrollbar { display: none; }
.tzp-pestanas.desborda-der { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.tzp-pestanas.desborda-izq { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.tzp-pestanas.desborda-izq.desborda-der {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.tzp-pestanas a { padding: 10px 14px; color: #667085; font-weight: 600; font-size: 14px;
  white-space: nowrap; display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.tzp-pestanas a:hover { color: var(--main-600); }
.tzp-pestanas a.activa { color: var(--main-700); box-shadow: inset 0 -2px 0 var(--main-600); }
.tzp-pestanas .cuenta { background: #f2f4f7; color: #475467; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.tzp-pestanas a.activa .cuenta { background: var(--main-50); color: var(--main-700); }

/* ---------------------------------------------------------------- botones y formularios */
.tzp .btn { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tzp .btn-sm { padding: 7px 14px; border-radius: 8px; font-size: 13px; }
.tzp .btn-main { padding: 10px 20px; border-radius: 10px; }
.tzp .btn-suave { background: #f2f4f7; color: #344054 !important; border: 0; padding: 10px 18px; border-radius: 10px; }
.tzp .btn-suave:hover { background: #e4e7ec; color: #101828 !important; }
.tzp .btn-peligro { background: #fdecec; color: #b42318 !important; border: 0; padding: 10px 18px; border-radius: 10px; }
.tzp .btn-peligro:hover { background: #d92d20; color: #fff !important; }
.tzp .btn-icono { width: 36px; height: 36px; padding: 0; border-radius: 8px; background: #f5f7fa; color: #475467 !important; border: 0; }
.tzp .btn-icono:hover { background: var(--main-50); color: var(--main-600) !important; }
.tzp .btn-icono.bg-main-600 { color: #fff !important; }
/* MarketPro pinta .btn de blanco con !important; los botones claros necesitan su color de texto. */
.tzp .common-input { border-radius: 10px; }
.tzp label { font-size: 14px; }
.tzp .form-switch .form-check-input { width: 2.4em; height: 1.3em; cursor: pointer; }
.tzp .form-check-label { cursor: pointer; }
.tzp-acciones { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tzp-pie-form { position: sticky; bottom: 0; background: rgba(244, 246, 249, .95); backdrop-filter: blur(6px);
  padding: 14px 0; margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; z-index: 5; border-top: 1px solid var(--tzp-borde); }
.tzp-datos { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.tzp-datos dt { color: #667085; font-weight: 500; }
.tzp-datos dd { margin: 0; color: #101828; word-break: break-word; }
.tzp-clave { background: #101828; color: #a6f4c5; border-radius: 12px; padding: 16px; font-family: ui-monospace, monospace;
  font-size: 13px; word-break: break-all; }
.tzp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #f2f4f7;
  color: #344054; font-size: 12px; font-weight: 600; }

/* ---------------------------------------------------------------- línea de tiempo */
.tzp-tiempo { list-style: none; margin: 0; padding: 0; position: relative; }
.tzp-tiempo li { position: relative; padding: 0 0 20px 32px; }
.tzp-tiempo li::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: #eaecf0; }
.tzp-tiempo li:last-child::before { display: none; }
.tzp-tiempo__punto { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--main-50);
  color: var(--main-600); display: flex; align-items: center; justify-content: center; font-size: 13px; }

/* ---------------------------------------------------------------- entrar */
.tzp-entrar { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.tzp-entrar__marca { background: var(--main-600); color: #fff; padding: 56px; display: flex; flex-direction: column;
  justify-content: space-between; position: relative; overflow: hidden; }
.tzp-entrar__marca::after { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); right: -160px; bottom: -160px; }
.tzp-entrar__marca .tz-logo__texto { color: #fff; }
.tzp-entrar__marca .tz-logo__icono { background: #fff; color: var(--main-600); }
.tzp-entrar__form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.tzp-entrar__caja { width: 100%; max-width: 420px; }
@media (max-width: 991.98px) { .tzp-entrar { grid-template-columns: 1fr; } .tzp-entrar__marca { padding: 28px 24px; }
  .tzp-entrar__marca .tzp-entrar__lema { display: none; } }

/* tarjetas de entrega (repartidor) */
.tzp-entrega { border: 1px solid var(--tzp-borde); border-radius: 16px; background: #fff; padding: 20px; }
.tzp-entrega__tel { font-size: 18px; font-weight: 700; color: var(--main-600); }

/* La flecha de los select ocupa su propio hueco: las reglas de padding de .tzp-filtros/.tzp-tabla la pisaban
   y quedaba encima del texto ("Todas las tien▾das"). */
.tzp select.common-input.form-select, select.common-input.form-select {
  padding-right: 40px !important; background-position: right 14px center; background-size: 14px 10px; text-overflow: ellipsis; }

/* Interruptores: Bootstrap mueve el input 2.5em a la izquierda (.form-switch) y con ps-0 se salía de la tarjeta. */
.form-check.form-switch.ps-0 .form-check-input, .form-check.ps-0 > .form-check-input { margin-left: 0; float: none; flex-shrink: 0; }

/* El lateral se desplaza entero: antes el pie fijo («Ver la tienda», «Documentación API») tapaba la sección
   Administración del central en pantallas de 900px de alto sin dar pista de que había más opciones. */
.tzp-lateral { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.tzp-menu { flex: 0 0 auto; overflow: visible; padding-bottom: 8px; }
.tzp-lateral__pie { margin-top: auto; }
.tzp-menu__seccion { padding: 12px 12px 4px; }
.tzp-menu__enlace { padding: 7px 12px; }

/* ---------------------------------------------------------------- tablas que caben en cualquier pantalla
   Escritorio y tableta: si la tabla no cabe, una sombra en el borde avisa de que hay más columnas.
   Móvil (<768): cada fila se convierte en una ficha «etiqueta: valor» (las etiquetas las pone panel.js
   desde la cabecera), así Estado, Total o los campos editables nunca quedan escondidos a la derecha. */
.tzp-tabla-envoltura {
  background:
    linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) 0 0 / 40px 100% no-repeat local,
    linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) 100% 0 / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(16,24,40,.16), transparent) 0 0 / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(16,24,40,.16), transparent) 100% 0 / 14px 100% no-repeat scroll;
}
@media (max-width: 1599.98px) { .tzp-tabla th { padding: 12px 12px; } .tzp-tabla td { padding: 12px 12px; } }

@media (max-width: 991.98px) {
  .tzp-tabla-envoltura { background: none; overflow: visible; }
  .tzp-tabla:not(.tzp-tabla--fija), .tzp-tabla:not(.tzp-tabla--fija) tbody, .tzp-tabla:not(.tzp-tabla--fija) tfoot,
  .tzp-tabla:not(.tzp-tabla--fija) tr, .tzp-tabla:not(.tzp-tabla--fija) td { display: block; width: 100%; }
  .tzp-tabla:not(.tzp-tabla--fija) thead { display: none; }
  .tzp-tabla:not(.tzp-tabla--fija) tbody tr { padding: 10px 0; border-bottom: 1px solid var(--tzp-borde); }
  .tzp-tabla:not(.tzp-tabla--fija) tbody tr:last-child { border-bottom: 0; }
  .tzp-tabla:not(.tzp-tabla--fija) tbody tr:hover td { background: transparent; }
  .tzp-tabla:not(.tzp-tabla--fija) td { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 5px 16px; border: 0; text-align: right; min-height: 32px; overflow-wrap: break-word; }
  /* todo el contenido de la celda va en un bloque a la derecha (panel.js): nombre y municipio, uno bajo otro */
  .tzp-tabla:not(.tzp-tabla--fija) td > .tzp-celda-valor { min-width: 0; flex: 0 1 auto; max-width: 70%; text-align: right; }
  .tzp-tabla:not(.tzp-tabla--fija) td::before { content: attr(data-etiqueta); flex: 0 0 auto; max-width: 45%; text-align: left;
    color: #667085; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
  .tzp-tabla:not(.tzp-tabla--fija) td[data-etiqueta=""]::before,
  .tzp-tabla:not(.tzp-tabla--fija) td:not([data-etiqueta])::before { display: none; }
  /* la primera columna es el título de la ficha: ocupa todo el ancho, sin etiqueta */
  .tzp-tabla:not(.tzp-tabla--fija) td.tzp-celda-titulo { display: block; text-align: left; padding-top: 6px; padding-bottom: 8px; }
  .tzp-tabla:not(.tzp-tabla--fija) td.tzp-celda-titulo::before { display: none; }
  .tzp-tabla:not(.tzp-tabla--fija) td[colspan] { display: block; text-align: center; }
  .tzp-tabla:not(.tzp-tabla--fija) td[colspan]::before { display: none; }
  .tzp-tabla:not(.tzp-tabla--fija) td > .common-input, .tzp-tabla:not(.tzp-tabla--fija) td > select,
  .tzp-tabla:not(.tzp-tabla--fija) td > input:not([type=checkbox]) { max-width: 60%; min-width: 0; flex: 1 1 auto; }
  /* el campo de la celda título (p. ej. el municipio de la cobertura) ocupa toda la ficha */
  .tzp-tabla:not(.tzp-tabla--fija) td.tzp-celda-titulo > .common-input, .tzp-tabla:not(.tzp-tabla--fija) td.tzp-celda-titulo > select {
    max-width: none; width: 100%; font-size: 13px; padding-left: 10px !important; padding-right: 32px !important; background-position: right 10px center; }
  .tzp-tabla:not(.tzp-tabla--fija) td.tzp-celda-titulo[style] { min-width: 0 !important; padding-left: 10px; padding-right: 10px; }
  /* pies (subtotal, total filtrado): etiqueta a la izquierda y valor a la derecha en una fila */
  .tzp-tabla:not(.tzp-tabla--fija) tfoot tr { display: flex; justify-content: space-between; align-items: center;
    padding: 4px 16px; border-top: 1px solid #f0f2f5; }
  .tzp-tabla:not(.tzp-tabla--fija) tfoot td { display: block; width: auto; padding: 4px 0; text-align: left; }
  .tzp-tabla:not(.tzp-tabla--fija) tfoot td::before { display: none; }
  .tzp-tabla:not(.tzp-tabla--fija) tfoot td:empty { display: none; }
  /* órdenes: la flecha comprador → destinatario va pegada al nombre, alineada a la derecha como el resto */
  .tzp-tabla--ordenes .tzp-cliente-entrega { justify-content: flex-end; }
  .tzp-tabla--ordenes .tzp-celda-cliente > div { min-width: 0; }
  .tzp-tabla--ordenes .tzp-recorte { max-width: 100% !important; white-space: normal !important; overflow: visible !important; }
  /* dentro de tarjetas con relleno, la ficha usa todo el ancho de la tarjeta */
  .tzp-tarjeta:not(.tzp-tarjeta--sin-padding) .tzp-tabla:not(.tzp-tabla--fija) td,
  .tzp-tarjeta:not(.tzp-tarjeta--sin-padding) .tzp-tabla:not(.tzp-tabla--fija) tfoot tr { padding-left: 0; padding-right: 0; }
}

/* Pestañas: si no caben pasan a otra línea (antes se escondían a los lados y no se veía que había más). */
.tzp-pestanas { flex-wrap: wrap; overflow: visible; row-gap: 0; -webkit-mask-image: none !important; mask-image: none !important; }
.tzp-pestanas a { white-space: nowrap; }
@media (max-width: 767.98px) { .tzp-pestanas a { padding: 8px 10px; font-size: 13px; } }

/* Selector de archivos propio (panel.js): botón legible y textos en español. */
.tzp-archivo { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px;
  border: 1px dashed #d0d5dd; border-radius: 10px; background: #fafbfc; cursor: pointer; margin: 0; width: 100%; }
.tzp-archivo:hover { border-color: var(--main-600); }
.tzp-archivo input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.tzp-archivo:focus-within { outline: 2px solid var(--main-200, #b9e4c9); outline-offset: 2px; }
.tzp-archivo__boton { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px;
  background: var(--main-600); color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.tzp-archivo__nombre { color: #667085; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tzp-archivo.con-archivo .tzp-archivo__nombre { color: #344054; font-weight: 500; }

/* Campo de color: muestra visible del color elegido, del mismo alto que los demás campos. */
input[type=color].common-input, input[type=color] { height: 48px; min-width: 72px; padding: 4px; cursor: pointer;
  border: 1px solid #d0d5dd; border-radius: 10px; background: #fff; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 6px; }
.tzp-filtros .tzp-fecha { width: 170px; flex: 0 0 170px; }
textarea.tz-texto-sms { line-height: 1.5; color: #344054; }
textarea.tz-texto-sms::placeholder { color: #98a2b3; }

/* Cifras de las tarjetas (plataformas): nunca parten una palabra; si no caben, pasan a la línea siguiente. */
.tzp-cifras { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.tzp-cifras > span { white-space: nowrap; }

/* Lista de datos separados por « · » sin separadores sueltos cuando falta alguno. */
.tzp-separados > * { display: inline-block; max-width: 100%; }
.tzp-separados > *:not(:last-child)::after { content: '·'; color: #98a2b3; margin: 0 .4em; }

/* Nombres largos en tablas: hasta dos líneas antes de recortar. */
.tzp-dos-lineas { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.tzp-tabla .tzp-celda-producto { min-width: 240px; }

/* Entrar/recuperar en móvil y tableta: la marca es una franja fina arriba y el formulario ocupa el resto. */
@media (max-width: 991.98px) {
  .tzp-entrar { grid-template-rows: auto 1fr; }
  .tzp-entrar__marca { flex-direction: row; align-items: center; justify-content: space-between; padding: 16px 20px; }
  .tzp-entrar__marca::after { display: none; }
  .tzp-entrar__marca > span { display: none; }
  .tzp-entrar__form { align-items: flex-start; padding-top: 32px; }
}

/* Selects del mismo alto y letra que los inputs de su fila (los filtros y tablas tienen sus propias medidas). */
:where(.tzp) select.common-input { font-size: 15px; }
:where(.tzp .tzp-tarjeta, .tzp .tzp-entrar__caja) :where(input.common-input:not([type=color], [type=checkbox], [type=radio], [type=file]), select.common-input) { height: 55px; }

/* Campos de solo lectura o desactivados: se ven como campo (con borde y fondo gris), no como texto suelto. */
.common-input:disabled, .common-input[readonly], select.common-input:disabled {
  background-color: #f2f4f7 !important; color: #475467; border: 1px solid #d0d5dd !important; opacity: 1; cursor: not-allowed; }
@media (min-width: 992px) { .tzp-celda-valor { display: contents; } }

/* ---- tercera revisión a ojo ---- */
/* Campos con error: borde rojo, no solo el texto de debajo. */
.tz-con-error .common-input, .tz-con-error select, .tz-con-error textarea { border-color: #f04438 !important; background-color: #fffbfa; }
/* Textareas con interlineado legible (las instrucciones y descripciones se veían apretadas). */
textarea.common-input { line-height: 1.5 !important; padding-top: 12px; padding-bottom: 12px; }
/* Título de la cabecera en móvil: puede ocupar dos líneas en vez de cortarse con «…». */
@media (max-width: 767.98px) {
  .tzp-titulo.text-line-1 { -webkit-line-clamp: 2; line-clamp: 2; white-space: normal; font-size: 17px; line-height: 1.25; }
}
/* Fichas de tabla dentro de una tarjeta con relleno: sin relleno lateral extra (antes quedaba doble). */
@media (max-width: 991.98px) {
  .tzp-tarjeta:not(.tzp-tarjeta--sin-padding) .tzp-tabla:not(.tzp-tabla--fija) td { padding-left: 0; padding-right: 0; }
}
/* Texto que no debe partirse (cifras con su unidad, códigos cortos). */
.tzp-junto { white-space: nowrap; }
/* Selector de archivo: el nombre ocupa lo que quede; «Sin archivos» cabe siempre. */
.tzp-archivo__nombre { flex: 1 1 auto; }
@media (max-width: 575.98px) { .tzp-filtros .tzp-fecha { flex: 1 1 100%; width: 100%; } }
/* Cobertura del almacén: números estrechos para que el municipio quepa entero. */
@media (min-width: 992px) { .tzp-tabla--cobertura input.common-input[type=number], .tzp-tabla--cobertura input.common-input[inputmode] { width: 84px; min-width: 0; } }
/* Casillas de verificación visibles (el gris del tema casi no se veía). */
.tzp .form-check-input:not(:checked) { border-color: #98a2b3; }
@media (max-width: 991.98px) {
  .tzp-tabla:not(.tzp-tabla--fija) td.num, .tzp-tabla:not(.tzp-tabla--fija) td.text-nowrap { white-space: normal; }
  .tzp-tabla:not(.tzp-tabla--fija) td.tzp-celda-larga { display: block; text-align: left; }
  .tzp-tabla:not(.tzp-tabla--fija) td.tzp-celda-larga::before { display: block; max-width: none; margin-bottom: 2px; }
  .tzp-tabla:not(.tzp-tabla--fija) td.tzp-celda-larga > .tzp-celda-valor { display: block; max-width: none; text-align: left; }
}
/* El tema añade 64 px arriba a .pagination: en el panel la paginación va en la misma línea que «1–30 de 52». */
.tzp nav .pagination { margin-block-start: 0 !important; }
/* Cabeza del menú: la X con su propio hueco, separada del nombre de la tienda. */
.tzp-lateral__cabeza { gap: 12px; }
.tzp-lateral__cabeza .tz-logo { min-width: 0; }
.tzp-lateral__cerrar { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.tzp-lateral__cerrar:hover { background: #f2f4f7; }

/* Textos de SMS: los enlaces de rastreo no tienen espacios; se parten donde haga falta en vez de salirse. */
.tzp .tz-texto-sms { overflow-wrap: anywhere; }

/* ---- cuarta revisión visual */
/* Cifras de las tarjetas de plataformas: todas en una fila (sin que «margen» caiga solo a otra). */
.tzp-cifras { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px 16px; }
.tzp-cifras > span { white-space: nowrap; line-height: 1.3; }
/* Última columna de las tablas: aire contra el borde de la tarjeta (VISIBLE en precios, totales). */
@media (min-width: 992px) {
  .tzp-tabla th:last-child, .tzp-tabla td:last-child { padding-right: 24px; }
}
/* Cabecera del menú lateral: el nombre de la tienda se recorta con «…» antes de llegar a la X. */
.tzp-lateral__cabeza .tz-logo, .tzp-lateral__cabeza .tz-logo__marca { min-width: 0; max-width: 100%; overflow: hidden; }
.tzp-lateral__cabeza .tz-logo__texto { overflow: hidden; text-overflow: ellipsis; }
/* Selector de color a la altura del resto de campos. */
.tzp input[type=color].common-input { height: 55px; padding: 6px 8px; }
/* Fichas (móvil/tableta): los dominios de una tienda siempre a la derecha, como el resto de valores. */
@media (max-width: 991.98px) {
  .tzp-tabla td > .tzp-celda-valor > div, .tzp-tabla td > div.mb-2 { text-align: right; }
}

/* ---------------------------------------------------------------- registros de API y eventos de webhook */
.tzp-detalle > summary { cursor: pointer; list-style: none; }
.tzp-detalle > summary::-webkit-details-marker { display: none; }
.tzp-detalle > summary::before { content: '▸'; color: #98a2b3; margin-right: 6px; }
.tzp-detalle[open] > summary::before { content: '▾'; }
.tzp-json { background: #101828; color: #d0d5dd; border-radius: 10px; padding: 10px 12px; font-size: 12px; max-height: 320px;
  overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 4px 0 8px; max-width: 640px; }

/* ---- selector propio: el botón recibe las mismas medidas que tenía el <select> en cada sitio del panel ---- */
.tzs__boton.common-input.form-select { padding-right: 40px !important; background-position: right 14px center; background-size: 14px 10px; }
:where(.tzp) .tzs__boton.common-input { font-size: 15px; }
:where(.tzp .tzp-tarjeta, .tzp .tzp-entrar__caja) .tzs__boton.common-input { height: 55px; padding-top: 0; padding-bottom: 0; }
.tzp-tabla .tzs__boton.common-input { padding: 6px 10px; font-size: 14px; height: 38px; }
.tzp-tabla .tzs { min-width: 84px; }
.tzp-filtros .tzs__boton.common-input { height: 42px; padding-top: 0; padding-bottom: 0; font-size: 14px; width: 100%; min-width: 0; }
.tzp-filtros > .tzs { min-width: 150px; }
@media (max-width: 575.98px) { .tzp-filtros > .tzs { flex: 1 1 100%; } }
@media (max-width: 991.98px) {
  .tzp-tabla:not(.tzp-tabla--fija) td > .tzs { max-width: 60%; min-width: 0; flex: 1 1 auto; }
  .tzp-tabla:not(.tzp-tabla--fija) td.tzp-celda-titulo > .tzs { max-width: none; width: 100%; }
  .tzp-tabla:not(.tzp-tabla--fija) td.tzp-celda-titulo > .tzs .tzs__boton { font-size: 13px; padding-left: 10px !important;
    padding-right: 32px !important; background-position: right 10px center; }
}

/* ---- órdenes: cliente y entrega en una celda; botones de imprimir ---- */
/* las celdas de tabla ignoran min-width: el ancho mínimo va en el contenido; lo largo se recorta con «…» (el título lo muestra entero) */
.tzp-celda-cliente > div { min-width: 210px; max-width: 280px; }
.tzp-tabla--ordenes .tzp-recorte { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tzp-tabla--ordenes .tzp-celda-cliente .tzp-recorte { max-width: 250px; }
/* «Lo cobra la plataforma» puede partirse en dos líneas en vez de ensanchar la tabla */
@media (min-width: 768px) { .tzp-tabla--ordenes td:nth-child(5) .tz-badge { white-space: normal; max-width: 120px; line-height: 1.25; border-radius: 10px; } }
@media (min-width: 768px) { .tzp-tabla--ordenes th, .tzp-tabla--ordenes td { padding-left: 10px; padding-right: 10px; }
  .tzp-tabla--ordenes th:first-child, .tzp-tabla--ordenes td:first-child { padding-left: 16px; } }
.tzp-cliente-entrega { display: flex; gap: 6px; align-items: flex-start; margin-top: 4px; }
.tzp-cliente-entrega > i { color: #98a2b3; margin-top: 3px; flex: 0 0 auto; }
.tzp-cliente-entrega > span { min-width: 0; }
.tzp-imprimir { display: inline-flex; gap: 6px; justify-content: flex-end; }
.tzp-icono-boton { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid #eaecf0; color: #475467; background: #fff; font-size: 17px; transition: all .15s; }
.tzp-icono-boton:hover { border-color: var(--main-600); color: var(--main-600); background: var(--main-50); }
.tzp-tabla--ordenes td:first-child { white-space: nowrap; }
.tzp-papeleria { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; border-radius: 12px;
  background: var(--main-50); color: #344054; font-size: 14px; }
.tzp-papeleria > i { color: var(--main-600); font-size: 20px; }
