*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --color-bg: #0d0d0d;
  --color-card: #1b1b1b;
  --color-accent: #7b1818;
  --color-accent-soft: #ddbf64;
  --color-border: #333333;
  --color-text: #fefefe;
  --color-text-muted: #c0c0c0;
  --radius-lg: 18px;
  --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.45);
  --transition-fast: 0.18s ease-out;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #2a1010 0, #050505 50%, #000 100%);
  color: var(--color-text);
  font-family: var(--font-sans);
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

.app-header {
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  background: linear-gradient(90deg, rgba(10, 10, 10, 0.9), rgba(20, 10, 10, 0.9));
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 14px;
  border: 2px solid var(--color-accent-soft);
  background: #fef3d4;
  box-shadow: 0 0 18px rgba(219, 166, 84, 0.55);
}

.brand-text h1 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-text p {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.app-main {
  flex: 1;
  padding: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 1.2rem;
}

.card {
  background: radial-gradient(circle at top left, rgba(219, 191, 100, 0.06), rgba(15, 15, 15, 0.98));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
  padding: 1.1rem 1.2rem 1.3rem;
}

.card h2 {
  margin-top: 0;
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
}

.card h3 {
  font-size: 0.95rem;
  margin: 1.1rem 0 0.6rem;
  color: var(--color-accent-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem 0.9rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* Aliases (la UI usa btn-primary/secondary/danger en varios módulos) */
.btn-primary,
.btn-secondary,
.btn-danger{
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary{
  background: linear-gradient(135deg, #7b1818, #b02828);
  color: #fefefe;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
}
.btn-primary:hover{ transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,0,0,0.8); }

.btn-secondary{
  background: transparent;
  color: var(--color-text-muted);
  border-color: rgba(255, 255, 255, 0.16);
}
.btn-secondary:hover{
  border-color: var(--color-accent-soft);
  color: var(--color-accent-soft);
  background: rgba(255, 255, 255, 0.02);
}

.btn-danger{
  background: transparent;
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.4);
}
.btn-danger:hover{ background: rgba(255, 107, 107, 0.08); }

.a33-pill-btn{
  min-height: 40px;
}

.hint{
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.hint-small{
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  color: var(--color-text-muted);
}

.customer-picker{
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.customer-picker input[type="text"]{
  flex: 1 1 180px;
  min-width: 180px;
}

.customer-picker select{
  flex: 1 1 220px;
  min-width: 220px;
}

.customer-new-box{
  margin-top: 0.55rem;
  padding: 0.55rem;
  border-radius: 12px;
  border: 1px dashed rgba(221, 191, 100, 0.35);
  background: rgba(5, 5, 5, 0.55);
}

.customer-new-actions{
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

input[type="text"],
input[type="search"],
input[type="date"],
input[type="number"],
textarea {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: rgba(5, 5, 5, 0.9);
  padding: 0.45rem 0.6rem;
  color: var(--color-text);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

input[type="date"]:read-only {
  opacity: 0.8;
}

input:focus,
textarea:focus {
  border-color: var(--color-accent-soft);
  box-shadow: 0 0 0 1px rgba(221, 191, 100, 0.7);
  background: rgba(18, 10, 10, 0.95);
}

textarea {
  resize: vertical;
  min-height: 70px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.btn.primary {
  background: linear-gradient(135deg, #7b1818, #b02828);
  color: #fefefe;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.8);
}

.btn.secondary {
  background: transparent;
  color: var(--color-text-muted);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn.secondary:hover {
  border-color: var(--color-accent-soft);
  color: var(--color-accent-soft);
  background: rgba(255, 255, 255, 0.02);
}

.btn.danger {
  background: transparent;
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.4);
}

.btn.danger:hover {
  background: rgba(255, 107, 107, 0.08);
}

.table-card {
  display: flex;
  flex-direction: column;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.table-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.table-pager{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap:0.6rem;
  margin-top: 0.55rem;
}

.table-pager .btn-secondary{
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.table-wrapper {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 210px);
  background: rgba(4, 4, 4, 0.9);
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.8rem;
}

thead {
  position: sticky;
  top: 0;
  background: rgba(15, 15, 15, 0.98);
  z-index: 1;
}

th,
td {
  padding: 0.45rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  overflow-wrap: anywhere;
  word-break: break-word;
}

th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.01);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(221, 191, 100, 0.75);
  font-size: 0.7rem;
  color: var(--color-accent-soft);
}

.actions-cell {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  /* Importante: NO recortar los íconos (en iPad podía colapsar a ~0px y “desaparecer”). */
  overflow: visible;
}

th.actions-col {
  text-align: right;
  white-space: nowrap;
}

td.actions-cell {
  text-align: right;
  padding-inline: 0.35rem;
}

/* Botones de acciones: compactos (iPad friendly) */
.actions-cell .a33-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 10px;
  line-height: 1;
  font-size: 1rem;
  -webkit-tap-highlight-color: transparent;
}

.app-footer {
  padding: 0.6rem 1.5rem 0.9rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(5, 5, 5, 0.95);
}


/* Histórico */
.search-input{
  min-width: 220px;
  flex: 1 1 220px;
}

.inline-notice{
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding: 0.2rem 0.35rem;
}

.inline-banner{
  margin: 0.35rem 0 0.75rem;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(221, 191, 100, 0.25);
  background: rgba(221, 191, 100, 0.06);
  color: var(--color-text);
  font-size: 0.8rem;
}

.badge.ok{
  border-color: rgba(70, 210, 140, 0.75);
  color: rgba(170, 255, 215, 0.95);
}

.badge.warn{
  border-color: rgba(221, 191, 100, 0.8);
  color: var(--color-accent-soft);
}

.col-date{ width: 92px; }
.col-code{ width: 118px; }
.col-status{ width: 98px; }
.col-money{ width: 98px; }

/* Columnas opcionales (iPad): se muestran al activar “Detalles” */
@media (max-width: 1024px){
  body:not(.a33-show-details) .col-hide-ipad{ display:none; }
}


/* Responsive */

@media (max-width: 1024px) {
  .app-main {
    grid-template-columns: minmax(0, 1fr);
  }

  /* En iPad / pantallas pequeñas: fuerza la tabla a “encajar” sin scroll horizontal */
  .table-wrapper {
    overflow-x: hidden;
  }

  #pedidos-table {
    table-layout: fixed;
  }

  #pedidos-table th,
  #pedidos-table td {
    white-space: normal;
    overflow: hidden;
  }

  /* Anchos compactos por columna (deja “Cliente” como la columna flexible) */
  #pedidos-table th:nth-child(1),
  #pedidos-table td:nth-child(1) {
    width: 88px;
  }

  #pedidos-table th:nth-child(2),
  #pedidos-table td:nth-child(2) {
    width: 92px;
  }

  #pedidos-table th:nth-child(4),
  #pedidos-table td:nth-child(4) {
    width: 88px;
  }

  #pedidos-table th:nth-child(5),
  #pedidos-table td:nth-child(5) {
    width: 86px;
    text-align: right;
  }

  #pedidos-table th:nth-child(6),
  #pedidos-table td:nth-child(6) {
    width: 84px;
    text-align: center;
  }

  #pedidos-table th.actions-col,
  #pedidos-table td.actions-cell {
    width: 148px;
  }

  /* Acciones: NO truncar/recortar los botones */
  #pedidos-table td.actions-cell {
    overflow: visible;
    text-overflow: clip;
  }

  .table-actions .search-input{
    min-width: 160px;
    flex: 1 1 160px;
  }

  .cell-clamp{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .table-wrapper {
    max-height: none;
  }

  td.actions-cell {
    padding-inline: 0.3rem;
  }

  .actions-cell .a33-icon-btn {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
    border-radius: 9px;
  }
}

@media (max-width: 720px) {
  .app-header {
    padding-inline: 1rem;
  }

  .app-main {
    padding: 0.9rem;
  }

  .card {
    padding-inline: 0.9rem;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand-text h1 {
    font-size: 1.05rem;
  }

  .logo {
    width: 48px;
    height: 48px;
  }
}


/* Pedidos: estilo para selects */
select {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: rgba(5, 5, 5, 0.9);
  padding: 0.45rem 0.6rem;
  color: var(--color-text);
  font-size: 0.85rem;
  outline: none;
}
select:focus {
  border-color: var(--color-accent-soft);
  box-shadow: 0 0 0 1px rgba(221, 191, 100, 0.7);
}
.checkbox-row{
  display:flex;
  align-items:center;
  gap:0.4rem;
  margin-top:0.4rem;
}
.checkbox-row label{
  margin:0;
}
.form-grid-compact{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(110px,1fr));
  gap:0.5rem;
}

/* Presentaciones (tabla compacta, sin scroll horizontal) */
.presentaciones-wrapper{
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(4, 4, 4, 0.9);
  overflow: hidden;
}

.presentaciones-wrapper .mini-table{
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.82rem;
}

.presentaciones-wrapper .mini-table th,
.presentaciones-wrapper .mini-table td{
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.presentaciones-wrapper .mini-table th{
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: rgba(15, 15, 15, 0.98);
}

.presentaciones-wrapper .mini-table .price-col,
.presentaciones-wrapper .mini-table .qty-col,
.presentaciones-wrapper .mini-table .line-total-col{
  width: 112px;
  text-align: right;
}

.presentaciones-wrapper .mini-table .qty-col{
  width: 104px;
}

.presentaciones-wrapper .mini-table td:nth-child(2),
.presentaciones-wrapper .mini-table td:nth-child(3),
.presentaciones-wrapper .mini-table td:nth-child(4){
  text-align: right;
}

.presentaciones-wrapper .mini-table input[type="number"]{
  width: 100%;
  min-width: 0;
  text-align: right;
}

.presentaciones-wrapper .product-name-cell{
  overflow-wrap: anywhere;
}

.presentaciones-wrapper .line-subtotal{
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.presentaciones-wrapper .pedidos-products-empty td{
  text-align: center !important;
  color: var(--color-text-muted);
}

@media (max-width: 720px){
  .presentaciones-wrapper .mini-table{
    font-size: 0.76rem;
  }
  .presentaciones-wrapper .mini-table th,
  .presentaciones-wrapper .mini-table td{
    padding: 0.38rem 0.34rem;
  }
  .presentaciones-wrapper .mini-table .price-col,
  .presentaciones-wrapper .mini-table .line-total-col{
    width: 86px;
  }
  .presentaciones-wrapper .mini-table .qty-col{
    width: 76px;
  }
}

/* Pedido rápido */
.pedido-completo-view[hidden],
.pedido-rapido-view[hidden]{
  display: none !important;
}

.pedidos-mode-switch{
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.8rem;
}

.pedidos-mode-switch h2,
.quick-section-head h2,
.quick-order-list-card h2{
  margin-bottom: 0.2rem;
}

.pedidos-mode-actions,
.quick-section-head,
.quick-product-adder,
.quick-history-tools{
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.quick-section-head{
  justify-content: space-between;
  align-items: flex-start;
}

.quick-order-form-card,
.quick-order-list-card{
  min-width: 0;
}

.quick-form-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem 0.9rem;
}

.quick-field-wide{
  grid-column: 1 / -1;
}

.quick-field-wide select{
  width: 100%;
}

.quick-product-adder{
  align-items: stretch;
  margin-top: 0.6rem;
}

.quick-product-adder select{
  flex: 1 1 auto;
  min-width: 0;
}

.quick-product-adder input{
  flex: 0 0 92px;
  width: 92px;
}

.quick-product-lines{
  display: grid;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.quick-product-line{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.quick-product-line strong,
.quick-order-products{
  overflow-wrap: anywhere;
}

.quick-order-list{
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.quick-order-card{
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid rgba(221, 191, 100, 0.55);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.26);
  padding: 0.7rem 0.8rem;
}

.quick-order-card.is-high{
  border-left-color: #ff6b6b;
}

.quick-order-main,
.quick-order-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.quick-order-title{
  margin: 0;
  font-size: 0.95rem;
}

.quick-order-products{
  margin: 0.35rem 0;
  color: var(--color-text-muted);
  font-size: 0.84rem;
}

.quick-order-meta{
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.quick-order-actions{
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}

.quick-order-empty{
  color: var(--color-text-muted);
  text-align: center;
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 14px;
}

.quick-history{
  grid-column: 1 / -1;
}

.quick-history summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  cursor: pointer;
  font-weight: 700;
  list-style-position: inside;
}

.quick-history-tools{
  justify-content: flex-end;
  margin-top: 0.85rem;
}

@media (max-width: 720px){
  .pedidos-mode-switch,
  .quick-order-main{
    align-items: stretch;
    flex-direction: column;
  }
  .pedidos-mode-actions{
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .quick-form-grid{
    grid-template-columns: 1fr;
  }
  .quick-field-wide{
    grid-column: auto;
  }
  .quick-product-adder{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px;
  }
  .quick-product-adder button{
    grid-column: 1 / -1;
  }
  .quick-product-adder input{
    width: 82px;
  }
  .quick-product-line{
    grid-template-columns: minmax(0, 1fr) 82px auto;
  }
}


.pedido-product-historical-row td {
  opacity: 0.88;
}

.pedido-product-historical-row input[readonly] {
  cursor: default;
}

/* Detalle de pedido dinámico */
body.a33-modal-open{
  overflow: hidden;
}

.a33-modal-backdrop{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.a33-modal-backdrop[hidden]{
  display: none !important;
}

.a33-modal-card{
  width: min(920px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(221, 191, 100, 0.28);
  background: linear-gradient(180deg, rgba(24, 11, 11, 0.98), rgba(6, 6, 6, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
  padding: 1rem;
}

.a33-modal-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.a33-modal-head h2{
  margin: 0;
}

.pedido-detail-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.pedido-detail-grid > div,
.pedido-detail-notes,
.pedido-detail-block{
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  padding: 0.65rem;
  min-width: 0;
}

.pedido-detail-grid span{
  display: block;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.18rem;
}

.pedido-detail-grid strong{
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.pedido-detail-block{
  margin-top: 0.75rem;
}

.pedido-detail-block h3{
  margin-top: 0;
}

.pedido-detail-table-wrap{
  overflow-x: hidden;
}

.pedido-detail-products-table{
  width: 100%;
  table-layout: fixed;
}

.pedido-detail-products-table th:nth-child(1),
.pedido-detail-products-table td:nth-child(1){
  width: auto;
}

.pedido-detail-products-table th:nth-child(2),
.pedido-detail-products-table td:nth-child(2){
  width: 70px;
}

.pedido-detail-products-table th:nth-child(3),
.pedido-detail-products-table td:nth-child(3),
.pedido-detail-products-table th:nth-child(4),
.pedido-detail-products-table td:nth-child(4){
  width: 118px;
}

.pedido-detail-products-table td{
  overflow-wrap: anywhere;
}

.num-cell{
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pedidos-products-empty-cell{
  text-align: center;
  color: var(--color-text-muted);
}

.totals-grid{
  margin-top: 0.75rem;
}

.pedido-detail-notes{
  margin-top: 0.75rem;
}

.pedido-detail-notes p{
  margin: 0.35rem 0;
  overflow-wrap: anywhere;
}

.modal-actions{
  margin-top: 0.9rem;
  justify-content: flex-end;
}

@media (max-width: 720px){
  .a33-modal-backdrop{
    padding: 0.55rem;
    align-items: stretch;
  }
  .a33-modal-card{
    max-height: 92vh;
    border-radius: 18px;
    padding: 0.8rem;
  }
  .pedido-detail-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pedido-detail-products-table th:nth-child(2),
  .pedido-detail-products-table td:nth-child(2){
    width: 54px;
  }
  .pedido-detail-products-table th:nth-child(3),
  .pedido-detail-products-table td:nth-child(3),
  .pedido-detail-products-table th:nth-child(4),
  .pedido-detail-products-table td:nth-child(4){
    width: 86px;
  }
}

/* Entrada numérica sin flechas nativas; conserva tipo y validaciones. */
input[type="number"]{appearance:textfield;-moz-appearance:textfield}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
