/* ShippOS 3.0 · Interfaz con fuentes nativas; factura Manrope local. */
/* Atlantic Minimal · Manrope servida localmente (Windows / macOS / PDF desde HTML). */
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ShippOS v3 · Atlantic Minimal. Editar variables aquí para cambios de identidad. */
:root {
 --sh-navy:#103B5C; --sh-blue:#1886C9; --sh-sky:#5BAFE8;
 --sh-mist:#EAF4FB; --sh-soft:#F7F9FC; --sh-ink:#273444;
 --sh-muted:#768396; --sh-orange:#E67E22; --sh-cream:#F6D48F;
 --sh-white:#FFFFFF; --sh-border:#E5EBF1; --sh-shadow:0 8px 28px rgba(35,54,75,.045);
 --sh-radius:12px; --sh-font:-apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; --sh-invoice-font:'Manrope', Arial, sans-serif;
 --am-sidebar-bg:#FFFFFF; --am-accent:#1886C9; --am-selection:#EAF4FB;

  /* Atlantic Minimal · tokens de componentes universales (fase de definición). */
  /* Estados universales de tabla · Atlantic Minimal aprobado. */
  --sh-table-row-hover:#F5F9FE;
  --sh-table-row-selected:#DCECFB;
  --sh-detail-card-bg:#FFFFFF;
  --sh-detail-card-border:#E4EDF7;
  --sh-detail-divider:#EAF0F7;
  --sh-detail-label:#91A3BA;
  --sh-detail-text:#7188A5;
  --sh-detail-status-bg:#F5F8FC;
  --sh-toolbar-height:35px;
  --sh-toolbar-padding-inline:14px;
  --sh-toolbar-gap:10px;
  --sh-toolbar-radius:7px;
  --sh-toolbar-font-size:12px;
  --sh-toolbar-text:#34475e;
  --sh-toolbar-bg:#ffffff;
  --sh-toolbar-border:#e1e8f2;
  --sh-toolbar-hover:#edf5ff;
  --sh-toolbar-primary:#287fdd;
  --sh-toolbar-primary-hover:#196abf;
  --sh-toolbar-focus:#1886c9;
  --sh-toolbar-count-bg:#e7f1fd;
  --sh-toolbar-count-text:#176eaf;
  --sh-view-gap:3px;
  --sh-view-padding:2px;
  --sh-view-height:27px;
  --sh-view-min-width:155px;
  --sh-view-radius:999px;
  --sh-view-bg:#f4f8fc;
  --sh-view-border:#dfe7f1;
  --sh-view-color:#536b87;
  --sh-view-hover:#e5eef9;
  --sh-view-active-bg:#dfeaf7;
  --sh-view-active-color:#176eaf;
  --sh-view-counter-bg:rgba(38,62,91,.08);
  --sh-view-counter-active-bg:rgba(23,110,175,.12);
}


/* ================================================================
   ATLANTIC MINIMAL · Estados universales de tablas principales
   Filas normales: colores exactos. Filas coloreadas: velo translúcido.
   No afecta modales ni la ficha expandible de Paquetes.
   ================================================================ */

/* Estado normal / hover, excluyendo filas con colores semánticos o inline. */
body.shippos-v3-desktop table.sh-table-universal:is(
  #tablaClientes,#tablaPrealertas,#tablaRegistroPaquetes,
  #tablaRegistroSinGuia,#tablaGuias
) tbody tr:not(.table-row-selected):not(.estado-encontrado):not(.estado-alerta):not(.estado-entregado_no_recibido):not(.estado-cancelado):not(:has(> td[style*="background-color"])):hover > td {
  background-color:var(--sh-table-row-hover)!important;
  --bs-table-bg:var(--sh-table-row-hover);
  --bs-table-accent-bg:transparent;
  --bs-table-bg-state:transparent;
  --bs-table-bg-type:transparent;
  box-shadow:none!important;
}

/* Estado normal / seleccionado: selección más definida y persistente. */
body.shippos-v3-desktop table.sh-table-universal:is(
  #tablaClientes,#tablaPrealertas,#tablaRegistroPaquetes,
  #tablaRegistroSinGuia,#tablaGuias
) tbody tr.table-row-selected:not(.estado-encontrado):not(.estado-alerta):not(.estado-entregado_no_recibido):not(.estado-cancelado):not(:has(> td[style*="background-color"])) > td {
  background-color:var(--sh-table-row-selected)!important;
  --bs-table-bg:var(--sh-table-row-selected);
  --bs-table-accent-bg:transparent;
  --bs-table-bg-state:transparent;
  --bs-table-bg-type:transparent;
  box-shadow:none!important;
}

/* Colores personalizados o semánticos: nunca reemplazar el fondo original.
   El sombreado inset compone el tono azul con el relleno existente. */
body.shippos-v3-desktop table.sh-table-universal:is(
  #tablaClientes,#tablaPrealertas,#tablaRegistroPaquetes,
  #tablaRegistroSinGuia,#tablaGuias
) tbody tr:is(.estado-encontrado,.estado-alerta,.estado-entregado_no_recibido,.estado-cancelado,:has(> td[style*="background-color"])):not(.table-row-selected):hover > td {
  --bs-table-accent-bg:transparent;
  --bs-table-bg-state:transparent;
  --bs-table-bg-type:transparent;
  box-shadow:inset 0 0 0 9999px rgba(24,134,201,.075)!important;
}

body.shippos-v3-desktop table.sh-table-universal:is(
  #tablaClientes,#tablaPrealertas,#tablaRegistroPaquetes,
  #tablaRegistroSinGuia,#tablaGuias
) tbody tr.table-row-selected:is(.estado-encontrado,.estado-alerta,.estado-entregado_no_recibido,.estado-cancelado,:has(> td[style*="background-color"])) > td {
  --bs-table-accent-bg:transparent;
  --bs-table-bg-state:transparent;
  --bs-table-bg-type:transparent;
  box-shadow:inset 0 0 0 9999px rgba(24,134,201,.19)!important;
}

/* Indicador izquierdo Atlantic Blue: todas las filas seleccionadas.
   Las filas sin relleno conservan su fondo azul exacto. */
body.shippos-v3-desktop table.sh-table-universal:is(
  #tablaClientes,#tablaPrealertas,#tablaRegistroPaquetes,
  #tablaRegistroSinGuia,#tablaGuias
) tbody tr.table-row-selected:is(.estado-encontrado,.estado-alerta,.estado-entregado_no_recibido,.estado-cancelado,:has(> td[style*="background-color"])) > td:first-child {
  box-shadow:inset 3px 0 0 var(--sh-blue),inset 0 0 0 9999px rgba(24,134,201,.19)!important;
}

/* Indicador en filas sin relleno: conservar el azul de selección y añadir barra. */
body.shippos-v3-desktop table.sh-table-universal:is(
  #tablaClientes,#tablaPrealertas,#tablaRegistroPaquetes,
  #tablaRegistroSinGuia,#tablaGuias
) tbody tr.table-row-selected:not(.estado-encontrado):not(.estado-alerta):not(.estado-entregado_no_recibido):not(.estado-cancelado):not(:has(> td[style*="background-color"])) > td:first-child {
  box-shadow:inset 3px 0 0 var(--sh-blue)!important;
}

/* Paquetes: misma barra lateral, sin alterar la selección conjunta fila + ficha. */
body.shippos-v3-desktop #moduloPaquetesV2 #tablaPaquetesV2 tbody tr[data-package-id].table-row-selected > td:first-child {
  box-shadow:inset 3px 0 0 var(--sh-blue)!important;
}


/* Atlantic Minimal · Paquetes: prolongar el indicador de selección
   sobre TODA la altura de la fila de ficha expandida, sin alterar
   el borde/acento propio ni la estructura de las cuatro cajas. */
body.shippos-v3-desktop #moduloPaquetesV2 #tablaPaquetesV2
  tbody tr[data-package-id].table-row-selected + tr.fila-detalle-paquete-v2 > td.celda-detalle-paquete-v2,
body.shippos-v3-desktop #moduloPaquetesV2 #tablaPaquetesV2
  tbody tr.fila-detalle-paquete-v2.table-row-selected > td.celda-detalle-paquete-v2 {
  position:relative!important;
}
body.shippos-v3-desktop #moduloPaquetesV2 #tablaPaquetesV2
  tbody tr[data-package-id].table-row-selected + tr.fila-detalle-paquete-v2 > td.celda-detalle-paquete-v2::before,
body.shippos-v3-desktop #moduloPaquetesV2 #tablaPaquetesV2
  tbody tr.fila-detalle-paquete-v2.table-row-selected > td.celda-detalle-paquete-v2::before {
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:0;
  width:3px;
  background:var(--sh-blue);
  pointer-events:none;
  z-index:1;
}

