body {
    background: #f5f6fa;
  }
  
  .login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
  }
  
  .login-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
  }

  .pedido-compacto {
    font-size: 0.86rem;
  }
  
  .pedido-compacto .card-header {
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .pedido-compacto .card-body {
    padding: 0.65rem 0.8rem;
  }
  
  .tabla-productos-compacta {
    font-size: 0.78rem;
  }
  
  .tabla-productos-compacta th,
  .tabla-productos-compacta td {
    padding: 0.35rem;
    vertical-align: middle;
  }
  
  .producto-corto {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  @media (max-width: 768px) {
    .pedido-compacto {
      font-size: 0.82rem;
    }
  
    .tabla-productos-compacta {
      font-size: 0.72rem;
    }
  
    .producto-corto {
      max-width: 105px;
    }
  }

  body {
    background: #f4f6f9;
  }
  
  .login-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 90px;
  }
  
  .login-card {
    width: 100%;
    max-width: 390px;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
  }
  
  .login-logo {
    max-width: 210px;
    height: auto;
  }
  
  .pedido-logo {
    width: 110px;
    height: auto;
  }
  
  .card {
    border-radius: 12px;
  }
  
  .btn {
    border-radius: 9px;
    font-weight: 600;
  }
  
  #accionesPedido {
    margin-bottom: 18px;
  }
  
  #seccionProductos {
    margin-top: 10px;
  }
  
  @media (max-width: 768px) {
    .login-page {
      padding-top: 45px;
    }
  
    .login-logo {
      max-width: 180px;
    }
  
    .pedido-logo {
      width: 85px;
    }
  
    #accionesPedido {
      margin-top: 14px;
      margin-bottom: 16px;
    }
  }

  .producto-search-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
  }
  
  .producto-search-card .card-body {
    padding: 0.85rem;
  }
  
  #formProducto label {
    font-size: 0.75rem;
    margin-bottom: 2px;
  }
  
  #formProducto input {
    height: 34px;
    font-size: 0.85rem;
  }
  
  #formProducto button {
    height: 34px;
    font-size: 0.85rem;
  }

  .card-control-alerta {
    background: #fff1f2;
    border-color: #f5c2c7;
  }
  
  .card-control-alerta .card-header {
    background: #f8d7da;
    color: #842029;
    border-color: #f5c2c7;
  }
  .card-control-ok {
    background: #f0fdf4;
    border-color: #bbf7d0;
  }
  
  .card-control-ok .card-header {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
  }

  #seccionDatosPedido .form-label {
    font-size: 0.82rem;
    margin-bottom: 4px;
  }
  
  #seccionDatosPedido .form-control,
  #seccionDatosPedido .form-select {
    font-size: 0.88rem;
  }
  
  #seccionDatosPedido .form-check-label {
    font-size: 0.9rem;
  }

  .control-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    margin-top: 6px;
  }
  
  .badge-control {
    min-width: 42px;
    text-align: center;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 0.72rem;
    background: #dcfce7;
    color: #166534;
  }
  
  .badge-control-activo {
    background: #fecaca;
    color: #991b1b;
  }

  .producto-encontrado-card {
    border: 1px solid #dbe4ef;
    background: #ffffff;
  }
  
  .producto-metricas .metric-box {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.45rem 0.6rem;
    background: #f8fafc;
  }
  
  .metric-box small {
    display: block;
    color: #6b7280;
    font-size: 0.72rem;
    line-height: 1;
  }
  
  .metric-box strong {
    display: block;
    margin-top: 3px;
    font-size: 0.88rem;
  }

  .producto-encontrado-card {
    border: 1px solid #dbe4ef;
    background: #ffffff;
    border-radius: 14px;
  }
  
  .producto-titulo {
    font-size: 0.98rem;
    font-weight: 800;
  }
  
  .producto-status {
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
  }
  
  .producto-status-ok {
    background: #dcfce7;
    color: #166534;
  }
  
  .producto-metricas .metric-box {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.48rem 0.6rem;
    background: #f8fafc;
    min-height: 58px;
  }
  
  .metric-box small {
    display: block;
    color: #6b7280;
    font-size: 0.7rem;
    line-height: 1;
  }
  
  .metric-box strong {
    display: block;
    margin-top: 4px;
    font-size: 0.92rem;
    line-height: 1.1;
  }
  
  .metric-box-stock {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
  }
  
  .metric-box-stock small,
  .metric-box-stock strong {
    color: #15803d;
  }
  
  .metric-box-stock span {
    display: block;
    margin-top: 2px;
    font-size: 0.68rem;
    color: #166534;
  }
  
  .producto-input-label {
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 4px;
  }
  
  .cantidad-control input {
    font-weight: 800;
  }
  
  .precio-input {
    font-weight: 800;
  }
  
  .btn-agregar-producto {
    font-weight: 800;
  }
  
  @media (max-width: 768px) {
    .producto-titulo {
      font-size: 0.88rem;
    }
  
    .producto-status {
      font-size: 0.68rem;
      padding: 3px 8px;
    }
  
    .producto-metricas .metric-box {
      min-height: 52px;
      padding: 0.4rem 0.5rem;
    }
  
    .metric-box small {
      font-size: 0.66rem;
    }
  
    .metric-box strong {
      font-size: 0.82rem;
    }
  }

  .totales-productos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
  }
  
  .totales-productos > div {
    padding: 0.75rem;
    text-align: center;
    border-right: 1px solid #e5e7eb;
  }
  
  .totales-productos > div:last-child {
    border-right: 0;
  }
  
  .totales-productos small {
    display: block;
    color: #6b7280;
    font-weight: 700;
    font-size: 0.72rem;
  }
  
  .totales-productos strong {
    display: block;
    margin-top: 3px;
    font-size: 1rem;
  }
  
  .totales-productos .total-neto {
    background: #f0fdf4;
    color: #15803d;
  }
  
  @media (max-width: 768px) {
    .totales-productos {
      grid-template-columns: repeat(2, 1fr);
    }
  
    .totales-productos > div {
      border-bottom: 1px solid #e5e7eb;
    }
  }

  .badge-control {
    display: inline-block;
    min-width: 38px;
    text-align: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 800;
    background: #dcfce7;
    color: #166534;
  }
  
  .badge-control-activo {
    background: #fecaca;
    color: #991b1b;
  }

  @media (max-width: 768px) {
    .badge-control {
      min-width: 28px;
      padding: 2px 5px;
      font-size: 0.58rem;
    }
  
    .tabla-productos-compacta {
      font-size: 0.66rem;
    }
  
    .tabla-productos-compacta th,
    .tabla-productos-compacta td {
      padding: 0.25rem;
    }
  
    .tabla-productos-compacta .btn {
      padding: 2px 6px;
      font-size: 0.68rem;
    }
  
    .producto-metricas .metric-box {
      min-height: 46px;
    }
  }

  @media (max-width: 480px) {
    .container {
      padding-left: 8px;
      padding-right: 8px;
    }
  
    #seccionProductos .card-body {
      padding: 0.55rem;
    }
  
    .producto-encontrado-card .card-body {
      padding: 0.6rem;
    }
  
    .producto-titulo {
      font-size: 0.78rem;
      line-height: 1.15;
    }
  
    .producto-status {
      font-size: 0.58rem;
      padding: 2px 7px;
    }
  
    .producto-metricas {
      gap: 0.35rem;
    }
  
    .producto-metricas .col-6 {
      width: 50%;
    }
  
    .producto-metricas .metric-box {
      min-height: 42px;
      padding: 0.32rem 0.42rem;
      border-radius: 8px;
    }
  
    .metric-box small {
      font-size: 0.58rem;
    }
  
    .metric-box strong {
      font-size: 0.72rem;
    }
  
    .metric-box-stock span {
      font-size: 0.55rem;
    }
  
    #formProducto label {
      font-size: 0.62rem;
    }
  
    #formProducto input,
    #formProducto button {
      height: 30px;
      font-size: 0.72rem;
    }
  
    .cantidad-control .btn {
      padding: 0 7px;
    }
  
    .totales-productos {
      grid-template-columns: repeat(4, 1fr);
    }
  
    .totales-productos > div {
      padding: 0.42rem 0.25rem;
    }
  
    .totales-productos small {
      font-size: 0.55rem;
    }
  
    .totales-productos strong {
      font-size: 0.72rem;
    }
  }

  @media (max-width: 480px) {
    .producto-encontrado-card {
      font-size: 0.72rem;
    }
  
    .producto-encontrado-card .card-body {
      padding: 0.45rem;
    }
  
    .producto-titulo {
      font-size: 0.72rem;
      line-height: 1.1;
      max-width: 85%;
    }
  
    .producto-status {
      font-size: 0.52rem;
      padding: 2px 6px;
    }
  
    .producto-metricas .col-6 {
      width: 33.333%;
    }
  
    .producto-metricas .metric-box {
      min-height: 38px;
      padding: 0.25rem 0.32rem;
      border-radius: 7px;
    }
  
    .metric-box small {
      font-size: 0.52rem;
    }
  
    .metric-box strong {
      font-size: 0.68rem;
      margin-top: 2px;
    }
  
    .metric-box-stock span {
      font-size: 0.5rem;
    }
  
    #formProducto {
      margin-top: 0.35rem !important;
    }
  
    #formProducto .col-5 {
      width: 35%;
    }
  
    #formProducto .col-4 {
      width: 35%;
    }
  
    #formProducto .col-3 {
      width: 30%;
    }
  
    #formProducto input,
    #formProducto button {
      height: 28px;
      font-size: 0.68rem;
    }
  
    .cantidad-control .btn {
      padding: 0 6px;
    }
  }

  @media (max-width: 480px) {
    .producto-metricas {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
    }
  
    .producto-metricas > div {
      width: 100% !important;
      max-width: 100% !important;
    }
  
    .producto-metricas .metric-box {
      min-height: 34px;
      padding: 0.22rem 0.28rem;
    }
  
    .metric-box small {
      font-size: 0.48rem;
    }
  
    .metric-box strong {
      font-size: 0.63rem;
    }
  }

  .cantidad-control {
    border: 2px solid #198754;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.12);
  }
  
  .cantidad-control input {
    font-weight: 900;
    background: #f0fdf4;
  }

  @media (max-width: 480px) {
    #contenedorCliente > .card {
      font-size: 0.78rem;
    }
  
    #contenedorCliente > .card .card-header {
      font-size: 0.86rem;
      padding: 0.45rem 0.65rem;
    }
  
    #contenedorCliente > .card .card-body {
      padding: 0.65rem;
    }
  
    #clienteNombre {
      font-size: 1rem;
      margin-bottom: 0.45rem !important;
    }
  
    #contenedorCliente .row > div {
      margin-bottom: 0.18rem;
    }
  
    .direccion-item {
      font-size: 0.78rem;
      line-height: 1.25;
    }
  
    #seccionDatosPedido {
      font-size: 0.78rem;
    }
  
    #seccionDatosPedido .card-header {
      font-size: 0.86rem;
    }
  }

  .revision-stat-card {
    border-radius: 12px;
    border: 1px solid #dbe4ef;
  }
  
  .revision-stat-card .card-body {
    padding: 0.75rem 1rem;
  }
  
  .revision-stat-card small {
    display: block;
    color: #6b7280;
    font-weight: 700;
  }
  
  .revision-stat-card strong {
    font-size: 1.35rem;
  }

  .resumen-card {
    min-width: 110px;
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    padding: 10px 14px;
    text-align: center;
  }
  
  .resumen-card span {
    display: block;
    font-size: .75rem;
    color: #6b7280;
    font-weight: 600;
  }
  
  .resumen-card strong {
    display: block;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
  }
  
  .resumen-credito strong {
    color: #dc3545;
  }
  
  .resumen-precio strong {
    color: #f59e0b;
  }
  
  .resumen-ambos strong {
    color: #2563eb;
  }

  .pedido-vendedor-nombre {
    margin-top: 4px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
  }
  .col-sitio {
    width: 120px;
}

.documento-vencido td {
  background-color: #e0f2fe !important;
}

.notas-hoy-lista {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.nota-hoy-card {
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  background: #fff;
  font-size: 13px;
}

.nota-hoy-top {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.nota-hoy-cliente {
  font-weight: 700;
  line-height: 1.15;
  margin-top: 4px;
}

.nota-hoy-sub {
  color: #6c757d;
  font-size: 12px;
  margin-bottom: 6px;
}

.nota-hoy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3px;
}

@media (max-width: 600px) {
  .swal2-popup {
    width: 94vw !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .swal2-title {
    font-size: 1.4rem !important;
  }
}

.swal-nota-hoy-detalle {
  font-size: 12px !important;
}

.swal-nota-hoy-detalle .swal2-title {
  font-size: 20px !important;
  margin-bottom: 8px !important;
}

.swal-nota-hoy-detalle .border {
  padding: 6px !important;
}

.swal-nota-hoy-detalle small {
  font-size: 11px !important;
}

.swal-nota-hoy-detalle .fw-bold,
.swal-nota-hoy-detalle strong {
  font-size: 12px !important;
}

.swal-nota-hoy-detalle table {
  font-size: 11px !important;
}

.swal-nota-hoy-detalle table th,
.swal-nota-hoy-detalle table td {
  padding: 3px 4px !important;
  vertical-align: middle;
}

.swal-nota-hoy-detalle .badge {
  font-size: 10px !important;
  padding: 4px 6px !important;
}

.swal-nota-hoy-detalle .swal2-html-container {
  padding: 0.5em 0.7em 0.2em !important;
}

.swal-nota-hoy-detalle .swal2-actions {
  margin-top: 10px !important;
}

.swal-nota-hoy-detalle table {
  table-layout: fixed;
  width: 100%;
}

.swal-nota-hoy-detalle th:nth-child(1),
.swal-nota-hoy-detalle td:nth-child(1) {
  width: 52px;
}

.swal-nota-hoy-detalle th:nth-child(2),
.swal-nota-hoy-detalle td:nth-child(2) {
  width: 38%;
}

.swal-nota-hoy-detalle th:nth-child(3),
.swal-nota-hoy-detalle td:nth-child(3) {
  width: 42px;
}

.swal-nota-hoy-detalle th:nth-child(4),
.swal-nota-hoy-detalle td:nth-child(4) {
  width: 62px;
  white-space: nowrap;
}

.producto-link {
  font-size: 11px !important;
  line-height: 1.1;
  color: #111827 !important;
}

.ruta-despacho-box {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  font-size: 0.92rem;
  min-height: 58px;
  width: 100%;
}

#alertaRutaDespacho {
  font-size: 0.92rem;
  font-weight: 600;
}

.consulta-stock-box {
  max-width: 360px;
}

@media (max-width: 600px) {
  .consulta-stock-box {
    max-width: 100%;
  }
}

.stock-precio-detalle {
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
}

.swal-nota-hoy-detalle .table {
  table-layout: fixed;
}

.stock-col-mov {
  width: 72px;
  word-break: break-word;
}

.stock-col-fecha {
  width: 92px;
  white-space: nowrap;
}

.stock-col-num {
  width: 76px;
  white-space: nowrap;
}

.stock-precio-card {
  font-weight: 800;
  color: #111827;
}

.stock-disponible-card {
  font-weight: 900;
  color: #111827;
}

.stock-precio-detalle {
  font-size: 1.1rem;
  font-weight: 900;
  color: #111827;
  margin-bottom: 4px;
}

.swal-nota-hoy-detalle .table {
  table-layout: fixed;
  width: 100%;
}

.stock-col-mov {
  width: 86px;
  word-break: break-word;
}

.stock-col-fecha {
  width: 112px;
  white-space: nowrap;
}

.stock-col-num {
  width: 62px;
  white-space: nowrap;
}

.swal-nota-hoy-detalle table th,
.swal-nota-hoy-detalle table td {
  padding: 5px 6px !important;
}

.swal-nota-hoy-detalle .stock-table {
  table-layout: fixed !important;
  width: 100% !important;
}

.swal-nota-hoy-detalle .stock-col-mov {
  width: 90px !important;
  min-width: 90px !important;
  max-width: 90px !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.swal-nota-hoy-detalle .stock-col-fecha {
  width: 116px !important;
  min-width: 116px !important;
  max-width: 116px !important;
  white-space: nowrap !important;
}

.swal-nota-hoy-detalle .stock-col-num {
  width: 62px !important;
  min-width: 62px !important;
  max-width: 62px !important;
  white-space: nowrap !important;
}

.swal-nota-hoy-detalle table th,
.swal-nota-hoy-detalle table td {
  padding: 5px 6px !important;
  vertical-align: middle !important;
}
.stock-vida-baja td {
  background-color: #fde2e2 !important;
}

.swal-documentos-cliente {
  width: 96% !important;
  max-width: 1100px !important;
  padding: 14px !important;
}

.swal-documentos-titulo {
  font-size: 1.35rem !important;
  line-height: 1.2 !important;
  margin-bottom: 12px !important;
}

.swal-documentos-html {
  margin: 0 !important;
  padding: 0 !important;
}

.detalle-documentos-mobile {
  width: 100%;
}

.detalle-documentos-resumen {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.95rem;
}

.detalle-documentos-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 430px;
  -webkit-overflow-scrolling: touch;
}

.detalle-documentos-tabla {
  width: 100%;
  min-width: 720px;
  margin-bottom: 0;
  table-layout: fixed;
  font-size: 0.82rem;
}

.detalle-documentos-tabla th,
.detalle-documentos-tabla td {
  padding: 5px 6px;
  vertical-align: middle;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.detalle-documentos-tabla th {
  font-size: 0.8rem;
  line-height: 1.15;
}

.detalle-documentos-tabla td {
  font-size: 0.8rem;
  line-height: 1.2;
}

.detalle-documentos-tabla .col-documento {
  width: 82px;
}

.detalle-documentos-tabla .col-fecha {
  width: 95px;
}

.detalle-documentos-tabla .col-sucursal {
  width: 55px;
}

.detalle-documentos-tabla .col-pago {
  width: 80px;
}

.detalle-documentos-tabla .col-monto {
  width: 105px;
}

@media (max-width: 576px) {
  .swal-documentos-cliente {
    width: calc(100% - 8px) !important;
    padding: 8px !important;
  }

  .swal-documentos-titulo {
    font-size: 1rem !important;
    line-height: 1.15 !important;
    margin-bottom: 10px !important;
  }

  .detalle-documentos-resumen {
    display: block;
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .detalle-documentos-resumen > div {
    margin-bottom: 2px;
  }

  .detalle-documentos-tabla {
    width: 100%;
    min-width: 540px;
    table-layout: fixed;
    font-size: 0.66rem;
  }

  .detalle-documentos-tabla th,
  .detalle-documentos-tabla td {
    padding: 3px 4px;
    font-size: 0.66rem;
    line-height: 1.05;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .detalle-documentos-tabla .col-documento {
    width: 78px;
  }

  .detalle-documentos-tabla .col-fecha {
    width: 72px;
  }

  .detalle-documentos-tabla .col-sucursal {
    width: 38px;
  }

  .detalle-documentos-tabla .col-pago {
    width: 55px;
  }

  .detalle-documentos-tabla .col-monto {
    width: 72px;
  }
}

.nota-hoy-direccion {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #e5e7eb;
}

.nota-hoy-direccion span {
  display: block;
  margin-bottom: 2px;
  font-size: 0.78rem;
  color: #6c757d;
}

.nota-hoy-direccion strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.25;
  color: #343a40;
  font-weight: 700;
}


  .sitios-revision {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .btn-sitio-revision {
    min-width: 100px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    padding: 9px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    transition:
      background-color 0.2s ease,
      border-color 0.2s ease,
      color 0.2s ease,
      box-shadow 0.2s ease,
      transform 0.2s ease;
  }

  .btn-sitio-revision:hover {
    border-color: #0d6efd;
    color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(13, 110, 253, 0.15);
  }

  .btn-sitio-revision.activo {
    border-color: #0d6efd;
    background: #0d6efd;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.25);
  }

  .btn-sitio-revision:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
  }

  .sitio-revision-nombre {
    display: block;
    margin-top: 1px;
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.8;
  }

  @media (max-width: 767px) {
    .btn-sitio-revision {
      flex: 1 1 auto;
      min-width: 90px;
      padding: 8px 14px;
    }
  }

  /* ==========================================================
   REVISION - HISTORIAL DE NOTAS
   ========================================================== */

   .historial-card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  }

  .resumen-historial {
    min-width: 135px;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 14px;
    background: #fff;
  }

  .resumen-historial span {
    display: block;
    color: #6c757d;
    font-size: 0.82rem;
  }

  .resumen-historial strong {
    display: block;
    margin-top: 2px;
    font-size: 1.45rem;
    line-height: 1.1;
  }

  .tabla-historial th {
    white-space: nowrap;
    color: #495057;
    font-size: 0.86rem;
  }

  .tabla-historial td {
    vertical-align: middle;
  }

  .detalle-etiqueta {
    color: #6c757d;
    font-size: 0.8rem;
    margin-bottom: 2px;
  }

  .detalle-valor {
    font-weight: 600;
    word-break: break-word;
  }

  .bloque-detalle {
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 16px;
    background: #fff;
  }

  .json-box {
    max-height: 420px;
    overflow: auto;
    padding: 16px;
    margin: 0;
    border-radius: 12px;
    background: #111827;
    color: #e5e7eb;
    font-size: 0.82rem;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .tabla-productos-detalle th {
    white-space: nowrap;
    font-size: 0.82rem;
  }

  .tabla-productos-detalle td {
    font-size: 0.86rem;
  }

  .estado-vacio {
    padding: 42px 20px;
    text-align: center;
    color: #6c757d;
  }

  .modal-xl {
    max-width: 1180px;
  }

  @media (max-width: 991.98px) {
    .navbar .container-fluid {
      padding-left: 1rem !important;
      padding-right: 1rem !important;
    }

    .encabezado-historial {
      align-items: flex-start !important;
      flex-direction: column;
      gap: 16px;
    }

    .resumenes-historial {
      width: 100%;
      flex-wrap: wrap;
    }
  }


  .swal-ofertas-popup {
    width: 96% !important;
    max-width: 760px !important;
    padding: 0.7rem !important;
  }
  
  .swal-ofertas-popup .swal2-title {
    font-size: 1.15rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .swal-ofertas-html {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .swal-ofertas-html h6 {
    font-size: 0.85rem;
    margin-bottom: 0.35rem !important;
  }
  
  .oferta-tabla-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 330px;
    border: 1px solid #dee2e6;
  }
  
  .tabla-ofertas {
    width: 100%;
    min-width: 690px;
    margin-bottom: 0;
    table-layout: fixed;
    font-size: 0.68rem;
  }
  
  .tabla-ofertas th,
  .tabla-ofertas td {
    padding: 0.18rem 0.22rem;
    line-height: 1.1;
    vertical-align: middle;
  }
  
  .tabla-ofertas th {
    white-space: nowrap;
    font-weight: 700;
    background: #f8f9fa;
  }
  
  .oferta-col-codigo {
    width: 70px;
    min-width: 70px;
    white-space: nowrap;
  }
  
  .oferta-col-producto {
    width: 170px;
    min-width: 170px;
    max-width: 170px;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
  
  .oferta-col-num {
    width: 58px;
    min-width: 58px;
    white-space: nowrap;
  }
  
  .oferta-col-precio {
    width: 72px;
    min-width: 72px;
    white-space: nowrap;
  }
  
  .oferta-col-fecha {
    width: 82px;
    min-width: 82px;
    white-space: nowrap;
  }
  
  .oferta-col-codigo {
    width: 70px;
    min-width: 70px;
    white-space: nowrap;
    text-align: center;
  }
  
  td.oferta-codigo-copiar {
    color: #0d6efd;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition:
      background-color 0.15s ease,
      color 0.15s ease;
  }
  
  td.oferta-codigo-copiar:hover {
    background-color: #eef5ff;
  }
  
  td.oferta-codigo-copiar:active {
    background-color: #dbeafe;
  }
  
  td.oferta-codigo-copiado {
    color: #198754;
    background-color: #e8f5ec;
  }
  
  .oferta-codigo-copiar:active {
    opacity: 0.6;
  }
  
  .swal-ofertas-html .badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.55rem !important;
  }
  
  @media (max-width: 576px) {
    .swal-ofertas-popup {
      width: 96% !important;
      padding: 0.5rem !important;
    }
  
    .tabla-ofertas {
      min-width: 660px;
      font-size: 0.64rem;
    }
  
    .tabla-ofertas th,
    .tabla-ofertas td {
      padding: 0.16rem 0.18rem;
    }
  
    .oferta-col-producto {
      width: 145px;
      min-width: 145px;
      max-width: 145px;
    }
  
    .oferta-tabla-scroll {
      max-height: 300px;
    }
  }