#orders{
  --ml-card-bg:linear-gradient(135deg,rgba(19,32,39,.94),rgba(14,19,24,.98));
  --ml-card-border:rgba(93,218,255,.24);
  --ml-card-text:#eef7fa;
  --ml-card-muted:#9fb2bc;
  --ml-cyan:#14d9ff;
  --ml-magenta:#ff4f9f;
  --ml-green:#39f7b2;
  --ml-amber:#ffd166;
}

#orders .design-job>footer button[title*="referencias" i] span[aria-label*="referencias" i],
#orders .design-job>footer button[title*="referencias" i] [aria-label*="referencias" i]{
  min-width:18px!important;
  height:18px!important;
  padding:0 6px!important;
  margin-left:5px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid rgba(57,247,178,.58)!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,rgba(57,247,178,.22),rgba(20,217,255,.11))!important;
  color:#bfffe9!important;
  font-size:10px!important;
  font-weight:750!important;
  line-height:1!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.04),0 0 12px rgba(57,247,178,.22),inset 0 0 10px rgba(57,247,178,.12)!important;
}

#orders .production-queue{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(400px,1fr))!important;
  gap:16px!important;
  align-items:start!important;
}

#orders .production-job{
  --promise-color:var(--ml-cyan);
  --promise-glow:rgba(20,217,255,.13);
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  min-height:auto!important;
  overflow:hidden!important;
  border:1px solid var(--ml-card-border)!important;
  border-left:0!important;
  border-radius:16px!important;
  background:var(--ml-card-bg)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),0 0 18px rgba(20,217,255,.08)!important;
}

#orders .production-job::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  border-radius:16px 0 0 16px;
  background:linear-gradient(180deg,var(--promise-color),rgba(255,255,255,.14));
  box-shadow:0 0 14px var(--promise-color),0 0 28px var(--promise-glow);
  pointer-events:none;
}

#orders .production-job::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--promise-glow),transparent 35%);
  opacity:.64;
  pointer-events:none;
}

#orders .production-job.late{--promise-color:var(--ml-magenta);--promise-glow:rgba(255,79,159,.16)}
#orders .production-job.blocked{--promise-color:#ff6b6b;--promise-glow:rgba(255,107,107,.18)}
#orders .production-job.delivered,
#orders .production-job:has(.production-status.ready),
#orders .production-job:has(.production-status.delivered){--promise-color:var(--ml-green);--promise-glow:rgba(57,247,178,.14)}
#orders .production-job:has(.production-status.authorized){--promise-color:var(--ml-amber);--promise-glow:rgba(255,209,102,.14)}

#orders .production-job>*{
  position:relative;
  z-index:1;
}

#orders .production-job>header{
  display:grid!important;
  grid-template-columns:1fr auto!important;
  align-items:start!important;
  padding:15px 16px 17px!important;
  gap:12px!important;
}

#orders .production-job>header>div{
  display:grid!important;
  gap:7px!important;
  min-width:0!important;
}

#orders .production-identity{
  display:grid!important;
  gap:2px!important;
  order:1!important;
}

#orders .production-client{
  color:#fff!important;
  font-size:15px!important;
  line-height:1.2!important;
  font-weight:750!important;
  letter-spacing:.01em!important;
  text-transform:none!important;
}

#orders .production-order{
  display:inline-flex!important;
  width:max-content!important;
  max-width:100%!important;
  color:#7ee2ff!important;
  font-size:10px!important;
  font-weight:650!important;
  letter-spacing:.02em!important;
}

#orders .production-product-copy{
  margin-top:3px!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
  color:#eef7fa!important;
  font-size:12.5px!important;
  line-height:1.38!important;
  font-weight:700!important;
}

#orders .production-job h3{
  order:2!important;
  color:var(--ml-card-text)!important;
  font-size:12.5px!important;
  line-height:1.35!important;
  margin:0!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
}

#orders .production-job h3.production-product{
  display:none!important;
}

#orders .production-job-finished h3{
  display:none!important;
}

#orders .production-job-finished{
  min-height:0!important;
}

#orders .production-area{
  order:0!important;
  width:max-content!important;
}

#orders .production-status{
  grid-column:2!important;
  grid-row:1!important;
}

#orders .production-job header p,
#orders .production-meta,
#orders .production-comments{
  color:var(--ml-card-muted)!important;
}

#orders .production-area,
#orders .production-status,
#orders .production-meta .gate{
  border:1px solid color-mix(in srgb,var(--promise-color) 45%,transparent)!important;
  background:linear-gradient(135deg,var(--promise-glow),rgba(8,16,20,.55))!important;
  color:color-mix(in srgb,var(--promise-color) 84%,white)!important;
  box-shadow:0 0 11px var(--promise-glow)!important;
}

#orders .production-meta{
  padding:10px 16px!important;
  gap:7px 12px!important;
}

#orders .production-comments{
  margin:0 16px 10px!important;
  padding:10px 12px!important;
  border:1px solid rgba(126,226,255,.09)!important;
  border-left:3px solid var(--promise-color)!important;
  border-radius:10px!important;
  background:rgba(4,10,13,.28)!important;
  color:#c8d9df!important;
  font-size:11px!important;
  line-height:1.4!important;
}

#orders .production-job-finished .production-meta{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:center!important;
}

#orders .production-job-finished .production-meta span:not(.gate):not(.payment-chip):not(.file-chip){
  opacity:.72!important;
  font-size:9px!important;
}

#orders .production-meta .payment-chip.wait-chip{
  border-color:rgba(255,209,102,.68)!important;
  color:#ffe1a0!important;
  background:linear-gradient(135deg,rgba(255,209,102,.2),rgba(9,18,23,.55))!important;
  box-shadow:0 0 14px rgba(255,209,102,.16)!important;
}

#orders .production-meta .payment-chip.ok-chip,
#orders .production-meta .file-chip.ok-chip{
  border-color:rgba(57,247,178,.55)!important;
  color:#bfffe9!important;
}

#orders .production-job>footer{
  justify-content:flex-end!important;
  margin-top:0!important;
  padding:11px 16px 14px!important;
}

#orders .production-job-finished>footer{
  border-top:1px solid rgba(126,226,255,.10)!important;
}

#orders .order-table-wrap table{
  display:block!important;
  width:100%!important;
  border:0!important;
  background:transparent!important;
}

#orders .order-table-wrap thead{
  display:none!important;
}

#orders .order-table-wrap tbody{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(360px,1fr))!important;
  gap:12px!important;
}

#orders .order-table-wrap tbody tr{
  --promise-color:var(--ml-amber);
  --promise-glow:rgba(255,209,102,.12);
  position:relative!important;
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:8px 12px!important;
  padding:15px 16px 14px 18px!important;
  border:1px solid var(--ml-card-border)!important;
  border-radius:16px!important;
  background:var(--ml-card-bg)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),0 0 18px rgba(20,217,255,.07)!important;
}

#orders .order-table-wrap tbody tr.late-row{--promise-color:var(--ml-magenta);--promise-glow:rgba(255,79,159,.16)}
#orders .order-table-wrap tbody tr:has(.order-light.green){--promise-color:var(--ml-green);--promise-glow:rgba(57,247,178,.13)}
#orders .order-table-wrap tbody tr:has(.order-light.red){--promise-color:var(--ml-magenta);--promise-glow:rgba(255,79,159,.16)}

#orders .order-table-wrap tbody tr::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  border-radius:16px 0 0 16px;
  background:linear-gradient(180deg,var(--promise-color),rgba(255,255,255,.14));
  box-shadow:0 0 14px var(--promise-color),0 0 28px var(--promise-glow);
}

#orders .order-table-wrap tbody td{
  display:grid!important;
  gap:4px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:var(--ml-card-text)!important;
  font-size:11px!important;
  min-width:0!important;
}

#orders #orderTable table tbody tr td,
#orders #orderTable table tbody tr:nth-child(even) td,
#orders #orderTable table tbody tr:nth-child(odd) td,
#orders #orderTable table tbody tr td:nth-child(n){
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
}

#orders .order-table-wrap tbody tr,
#orders .order-table-wrap tbody tr:nth-child(even),
#orders .order-table-wrap tbody tr:nth-child(odd){
  background:var(--ml-card-bg)!important;
}

#orders .order-table-wrap tbody td::before{
  color:#42eaff!important;
  font-size:9px!important;
  font-weight:700!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}

#orders .order-table-wrap tbody td:nth-child(1)::before{content:"Alerta"}
#orders .order-table-wrap tbody td:nth-child(2)::before{content:"Pedido"}
#orders .order-table-wrap tbody td:nth-child(3)::before{content:"Cliente"}
#orders .order-table-wrap tbody td:nth-child(4)::before{content:"Detalles"}
#orders .order-table-wrap tbody td:nth-child(5)::before{content:"Estado"}
#orders .order-table-wrap tbody td:nth-child(6)::before{content:"Vendedor"}
#orders .order-table-wrap tbody td:nth-child(7)::before{content:"Diseñador"}
#orders .order-table-wrap tbody td:nth-child(8)::before{content:"Promesa"}

#orders .order-table-wrap tbody td:nth-child(4),
#orders .order-table-wrap tbody td:last-child{
  grid-column:1/-1!important;
}

#orders .order-table-wrap tbody td b{
  color:var(--ml-card-text)!important;
}

#orders .order-table-wrap tbody td small{
  color:var(--ml-card-muted)!important;
  line-height:1.45!important;
}

#orders .order-table-wrap tbody select,
#orders .order-table-wrap tbody button{
  max-width:100%!important;
  border-color:rgba(20,217,255,.42)!important;
  background:rgba(9,18,23,.72)!important;
  color:#eaf8fb!important;
  box-shadow:0 0 12px rgba(20,217,255,.09)!important;
}

#orders .order-table-wrap tbody button{
  width:max-content!important;
  justify-self:end!important;
}

@media(max-width:760px){
  #orders .production-queue,
  #orders .order-table-wrap tbody{grid-template-columns:1fr!important}
  #orders .order-table-wrap tbody tr{grid-template-columns:1fr!important}
  #orders .order-table-wrap tbody td{grid-column:1/-1!important}
  #orders .order-table-wrap tbody button{justify-self:stretch!important;width:100%!important}
}

/* Producción: ficha tipo Diseño / Bitácora completa, reducida sin forzar */
#orders .production-queue{
  grid-template-columns:repeat(auto-fit,minmax(420px,1fr))!important;
  gap:14px!important;
}

@media(min-width:1600px){
  #orders .production-queue{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

@media(max-width:980px){
  #orders .production-queue{
    grid-template-columns:1fr!important;
  }
}

#orders .production-job{
  min-height:246px!important;
  border-radius:15px!important;
  background:linear-gradient(135deg,rgba(29,35,39,.96),rgba(18,25,30,.98))!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.028),0 0 18px rgba(20,217,255,.08)!important;
}

#orders .production-job>header{
  grid-template-columns:1fr auto!important;
  gap:12px!important;
  padding:14px 16px 12px!important;
  border-bottom:1px solid rgba(126,226,255,.10)!important;
}

#orders .production-job>header>div{
  gap:6px!important;
}

#orders .production-area{
  padding:4px 9px!important;
  border-radius:999px!important;
  font-size:8px!important;
  line-height:1!important;
  letter-spacing:.06em!important;
}

#orders .production-status{
  align-self:start!important;
  padding:4px 9px!important;
  border-radius:999px!important;
  font-size:8px!important;
  line-height:1!important;
  white-space:nowrap!important;
}

#orders .production-client{
  font-size:14px!important;
  line-height:1.18!important;
}

#orders .production-order{
  font-size:9.5px!important;
  color:#73e7ff!important;
}

#orders .production-product-copy{
  margin-top:3px!important;
  -webkit-line-clamp:3!important;
  font-size:11.2px!important;
  line-height:1.34!important;
  font-weight:720!important;
}

#orders .production-comments{
  order:2!important;
  margin:10px 16px 0!important;
  padding:9px 11px!important;
  border-radius:10px!important;
  font-size:10.5px!important;
  line-height:1.35!important;
  display:-webkit-box!important;
  -webkit-line-clamp:3!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
}

#orders .production-meta{
  order:3!important;
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:6px 7px!important;
  padding:11px 16px!important;
  border-top:1px solid rgba(126,226,255,.10)!important;
}

#orders .production-meta .gate,
#orders .production-meta .payment-chip,
#orders .production-meta .file-chip{
  min-width:0!important;
  justify-content:flex-start!important;
  padding:4px 8px!important;
  border-radius:999px!important;
  font-size:8.5px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

#orders .production-meta span:not(.gate):not(.payment-chip):not(.file-chip){
  font-size:8px!important;
  opacity:.78!important;
}

#orders .production-job>footer{
  order:4!important;
  display:flex!important;
  flex-wrap:wrap!important;
  gap:6px!important;
  justify-content:flex-end!important;
  margin-top:auto!important;
  padding:11px 16px 14px!important;
  border-top:1px solid rgba(126,226,255,.10)!important;
}

#orders .production-job>footer button{
  min-height:32px!important;
  padding:8px 10px!important;
  border-radius:9px!important;
  font-size:9.5px!important;
}

/* Producción v18: misma línea visual que Bitácora completa / Mis diseños */
#orders .production-queue{
  grid-template-columns:repeat(auto-fit,minmax(360px,1fr))!important;
  gap:12px!important;
  align-items:stretch!important;
}

#orders .production-job{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  grid-template-rows:auto auto 1fr auto!important;
  gap:8px 12px!important;
  height:100%!important;
  min-height:0!important;
  padding:15px 16px 14px 18px!important;
  border:1px solid var(--ml-card-border)!important;
  border-left:0!important;
  border-radius:16px!important;
  background:var(--ml-card-bg)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),0 0 18px rgba(20,217,255,.07)!important;
}

#orders .production-job>header{
  grid-column:1/-1!important;
  display:grid!important;
  grid-template-columns:1fr auto!important;
  align-items:start!important;
  gap:10px 12px!important;
  padding:0 0 10px!important;
  border-bottom:1px solid rgba(126,226,255,.12)!important;
}

#orders .production-job>header>div{
  display:grid!important;
  gap:5px!important;
  min-width:0!important;
}

#orders .production-area{
  order:0!important;
  width:max-content!important;
  padding:4px 9px!important;
  border-radius:999px!important;
  font-size:8px!important;
  line-height:1!important;
  letter-spacing:.06em!important;
}

#orders .production-status{
  grid-column:2!important;
  grid-row:1!important;
  align-self:start!important;
  padding:4px 9px!important;
  border-radius:999px!important;
  font-size:8px!important;
  line-height:1!important;
  white-space:nowrap!important;
}

#orders .production-identity{
  order:1!important;
  display:grid!important;
  gap:3px!important;
}

#orders .production-client{
  color:#fff!important;
  font-size:13px!important;
  line-height:1.2!important;
  font-weight:760!important;
}

#orders .production-order{
  color:#73e7ff!important;
  font-size:9px!important;
  font-weight:650!important;
}

#orders .production-product-copy{
  margin-top:2px!important;
  -webkit-line-clamp:2!important;
  font-size:11px!important;
  line-height:1.32!important;
  font-weight:720!important;
}

#orders .production-comments{
  grid-column:1/-1!important;
  order:2!important;
  margin:0!important;
  padding:10px 12px!important;
  border:1px solid rgba(126,226,255,.09)!important;
  border-left:3px solid var(--promise-color)!important;
  border-radius:10px!important;
  background:rgba(4,10,13,.28)!important;
  color:#c8d9df!important;
  font-size:11px!important;
  line-height:1.4!important;
  display:-webkit-box!important;
  -webkit-line-clamp:3!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
}

#orders .production-meta{
  grid-column:1/-1!important;
  order:3!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px 12px!important;
  padding:0!important;
  border-top:0!important;
  color:var(--ml-card-muted)!important;
}

#orders .production-meta .gate,
#orders .production-meta .payment-chip,
#orders .production-meta .file-chip{
  min-width:0!important;
  justify-content:flex-start!important;
  padding:4px 8px!important;
  border-radius:999px!important;
  font-size:8.5px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

#orders .production-meta span:not(.gate):not(.payment-chip):not(.file-chip){
  font-size:8.5px!important;
  opacity:.78!important;
}

#orders .production-job>footer{
  grid-column:1/-1!important;
  order:4!important;
  align-self:end!important;
  display:flex!important;
  flex-wrap:wrap!important;
  gap:7px!important;
  justify-content:flex-end!important;
  margin:0!important;
  padding:10px 0 0!important;
  border-top:1px solid rgba(126,226,255,.12)!important;
}

#orders .production-job>footer button{
  min-height:32px!important;
  padding:8px 11px!important;
  border-radius:9px!important;
  font-size:9.5px!important;
}

@media(max-width:760px){
  #orders .production-queue{grid-template-columns:1fr!important}
  #orders .production-job{grid-template-columns:1fr!important}
  #orders .production-meta{grid-template-columns:1fr!important}
  #orders .production-job>footer button{width:100%!important}
}
