/* Grid de Pedidos */
.pedidos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

/* Tabs de Cocina */
.cocina-tabs {
  display: flex;
  gap: 20px;
  padding: 0 32px;
  margin-top: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Tarjeta de Pedido (Ticket) */
.pedido-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.pedido-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Bordes indicadores de tipo de pedido */
.pedido-card.tipo-mesa { border-left: 5px solid #ef4444; }      /* Rojo */
.pedido-card.tipo-delivery { border-left: 5px solid #2563eb; }  /* Azul */
.pedido-card.tipo-llevar { border-left: 5px solid #f97316; }    /* Naranja */

/* Encabezado del Ticket */
.pedido-header {
  padding: 15px 20px;
  background: var(--gray-50);
  border-bottom: 1px dashed var(--gray-300);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pedido-tipo {
  font-weight: 700;
  color: var(--gray-800);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pedido-hora {
  font-size: 0.8rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* Cuerpo del Ticket */
.pedido-body {
  padding: 20px;
  flex: 1;
}

.lista-platos {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lista-platos li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  padding-bottom: 8px;
}

.lista-platos li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cantidad-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-right: 10px;
}

/* Observaciones */
.pedido-observaciones {
  margin-top: 15px;
  padding: 10px;
  background: #fffbeb; /* Amarillo muy suave */
  border-left: 3px solid var(--warning);
  font-size: 0.85rem;
  color: var(--gray-700);
  border-radius: 4px;
}

/* Footer y Estado */
.pedido-footer {
  padding: 15px 20px;
  background: white;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.estado-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Colores de Estado */
.estado-pendiente { background: #fee2e2; color: #991b1b; } /* Rojo */
.estado-preparando { background: #fef3c7; color: #92400e; } /* Naranja */
.estado-listo { background: #d1fae5; color: #065f46; } /* Verde */

/* Iconos de tipo */
.icon-tipo { color: var(--primary); }

/* Botón de Acción en Tarjeta */
.btn-action {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: var(--secondary); /* Verde */
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-action:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-action:active {
  transform: translateY(0);
}

/* Animación de parpadeo para nuevos pedidos */
@keyframes flash-new {
  0%, 100% { box-shadow: var(--shadow-sm); transform: scale(1); border-color: var(--gray-200); }
  50% { box-shadow: 0 0 0 4px var(--primary-light); transform: scale(1.02); border-color: var(--primary); background-color: #f0f9ff; }
}

.new-order-blink {
  animation: flash-new 1s ease-in-out 3; /* Parpadea 3 veces */
}

/* Cronómetro de Pedido */
.order-timer {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
  margin-top: 4px;
  background: rgba(37, 99, 235, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.order-timer.urgent {
  color: #ef4444;
  background: #fee2e2;
  animation: pulse-text 1s infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}